-
Notifications
You must be signed in to change notification settings - Fork 24
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
click_log only applies to the initial module's logger. #9
Comments
|
That still won't activate logging for third party libraries though (which is in many cases desirable). |
Then pass the root logger instead
…On 29 August 2017 18:21:54 GMT+02:00, Hugo Osvaldo Barrera ***@***.***> wrote:
That still won't activate logging for third party libraries though
(which is in many cases desirable).
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#9 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
I had to do this for both With the previous version none of this was necessary btw, which was the behaviour I was expecting. I'd prefer it to work the way it did, i.e. the logger is configured for all loggers. |
On Thu, Sep 14, 2017 at 08:44:23AM +0000, Simon van der Veldt wrote:
> Then pass the root logger instead
I had to do this for both `click_log.basic_config("")` as well as ***@***.***_log.simple_verbosity_option("")`. I'm not sure this makes sense?
This does make sense, since that is the root logger. Same as
`basic_config(logging.getLogger())` or `basic_config()`.
With the previous version none of this was necessary btw, which was the behaviour I was expecting. I'd prefer it to work the way it did, i.e. the logger is configured for all loggers.
The behavior didn't change in that regard. You still pass a logger to
basic_config / init, the default is the root logger.
If it's going to stay the way it is right now this should be documented.
Sure, which part of the docs are you referring to?
…
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#9 (comment)
|
This is not the case for click-log/click_log/options.py Line 7 in 64c6188
Something like adding a title/header with contents for:
|
On an app with more than one logger, click_log will configure the logger for the initial module (where
click_log.basic_config
is called), but not other modules.This results in
click_log
effectively having no effect on other modules.A potential solution for this, would be to make
basic_config
takelogger
as an OPTIONAL parameter.If
logger == None
, then configurelogging
(which basically means, override global defaults).The text was updated successfully, but these errors were encountered: