Skip to content

Conversation

wildart
Copy link

@wildart wildart commented Apr 28, 2015

New loggers inherit root logger properties unless specified otherwise explicitly.

julia> using Logging

julia> Logging.configure(level=DEBUG) # root is DEBUG now
Logger(root,DEBUG,TTY(open, 0 bytes waiting),root)

julia> logger1 = Logger("logger1") # logger1 is DEBUG as well
Logger(logger1,DEBUG,TTY(open, 0 bytes waiting),root)

julia> logger2 = Logger("logger2", level=INFO) # logger2 is INFO
Logger(logger2,INFO,TTY(open, 0 bytes waiting),root)

Plus, compatibility and trailing spaces fix.

@kmsquire
Copy link
Owner

This seems reasonable. Can you add a note to the README under "More advanced usage"?

@colinfang
Copy link

I would like the child logger behave the same as the ones in Python Logging, with unset level so that it follows the runtime level of root logger.

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

Successfully merging this pull request may close these issues.

3 participants