Logging.jl
Logging.jl copied to clipboard
new loggers inherit `root` logger properties
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.
This seems reasonable. Can you add a note to the README under "More advanced usage"?
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.