Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Honour logging settings from config to disable log level. #3532

wants to merge 4 commits into from

Conversation

VeNoMouS
Copy link

Short Description:

If 'debug' etc is set to False in config, then honour this setting by not logging it to CLI.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a loop ?

Copy link
Author

@VeNoMouS VeNoMouS Aug 10, 2016

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.

@elicwhite
Copy link
Contributor

@douglascamata Please review

@douglascamata
Copy link
Member

@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 LoggingHandler does. This will solve lots of problems now and in the long term.

@VeNoMouS
Copy link
Author

VeNoMouS commented Aug 11, 2016

@douglascamata , sorry I don't understand what you mean in regards to

Please, make this handler use the logging module just like the LoggingHandler does.
This will solve lots of problems now and in the long term.

Are you asking me to rewrite colored_logging_handler.py completely so it doesn't use sys.stdout.write?

This was referenced Aug 11, 2016
@douglascamata
Copy link
Member

@VeNoMouS if you can, yes, please.

@douglascamata
Copy link
Member

#3637 have a proper coloured logging handler rework to fix this.

@VeNoMouS
Copy link
Author

@douglascamata ah awesome, least a fix has been found :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants