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

Two1 logger and custom loggers conflict. Good practice suggestion? #17

Open
zxpectre opened this issue Feb 2, 2017 · 1 comment
Open

Comments

@zxpectre
Copy link

zxpectre commented Feb 2, 2017

I have been trying to customize my own logger for my server but the class of logging.getLoggerClass() changes to two1.commands.util.logger.ClickLogger after importing some two1 modules that are necesary for login and other purposes, I presume, this happends because of this few lines of code at the end of two1/commands/util/logger.py :


# adds the handler, formatter, and sets default level to the second lowest
click_logger.addHandler(click_log_handler)
click_logger.setLevel(logging.INFO)
logging.setLoggerClass(ClickLogger)


What would be the right/recommended way of customizing my own server logger without messing with two1 logger?

Altering last used logger config. (obtained with logging.getLogger()) causes both loggers to interfiere with each other.

@sevta01
Copy link

sevta01 commented May 18, 2017

Ok

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

No branches or pull requests

2 participants