Logging.jl icon indicating copy to clipboard operation
Logging.jl copied to clipboard

new loggers inherit `root` logger properties

Open wildart opened this issue 9 years ago • 2 comments

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.

wildart avatar Apr 28 '15 16:04 wildart

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

kmsquire avatar Apr 28 '15 17:04 kmsquire

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.

colinfang avatar Jan 26 '16 17:01 colinfang