kmsquire / Logging.jl

Logging package for julia
Other
43 stars 26 forks source link

new loggers inherit `root` logger properties #18

Open wildart opened 9 years ago

wildart commented 9 years ago

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 commented 9 years ago

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

colinfang commented 8 years ago

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.