invenia / Memento.jl

A flexible logging library for Julia
https://invenia.github.io/Memento.jl/latest
Other
88 stars 14 forks source link

Inherit log levels #63

Closed rofinn closed 5 years ago

rofinn commented 6 years ago

It might be trying to have loggers inherit their log level from their parents. This would mean that doing Memento.config("info") would automatically set all subloggers to "info". It looks like there is a lisp package that does this... and can handle multiple parents. I'll take a look at how this is implemented and whether Memento can do something similar.

Each logger has a level which is used to determine whether a particular message should be processed or not. Loggers inherit their log level from their parents. If a logger has multiple direct parents its log level is the min of the levels of its parents.

http://quickdocs.org/a-cl-logger/

I'll note that one of the criticisms of this library is that it is one of the slowest lisp logging libraries.

nicoleepp commented 5 years ago

@rofinn Has this been solved with the recursive kwarg?

rofinn commented 5 years ago

I think recursive works well enough. I'd still be curious about how the inheritance approach would play out, but I don't have any intention of implementing that anytime soon. Close and re-open later if I want to tackle it.