-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Honour logging settings from config to disable log level. #3532
Conversation
for event_level in ['info', 'warning', 'error', 'critical', 'debug']: | ||
if event_level == level and hasattr(self.bot.config, event_level) and not getattr(self.bot.config, event_level): | ||
self._last_event = event | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a loop ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea ok, I see what you mean, let me fix that.
@douglascamata Please review |
@VeNoMouS this is a hack that won't stay here for very long time. Please, make this handler use the logging module just like the |
@douglascamata , sorry I don't understand what you mean in regards to
Are you asking me to rewrite |
@VeNoMouS if you can, yes, please. |
#3637 have a proper coloured logging handler rework to fix this. |
@douglascamata ah awesome, least a fix has been found :) |
Short Description:
If 'debug' etc is set to False in config, then honour this setting by not logging it to CLI.