-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hard coded min level for TransformerLogger
#93
Comments
Because each component in the compositional logging system serves one purpose. |
That's fair, but following this logic I would expect It feels to me like setting a hardcoded min level is an additional action from |
Perhaps think of it like this: The default setting for a logger is |
It does, doesn't it? We check that here:
using:
and respect it. I guess as an implementation detail we could have put that info into our |
I am very confused now. I opened this issue cause I was surprise by the behavior of with_logger(TransformLogger(identity, ConsoleLogger(Info))) do
@debug "A"
@info "B"
end which returned both the |
Spooky. |
If I can ask a design question related to this. When composing loggers (ignoring the So we can have something like What if in my code I would like to keep transform my logs based on the code path? I wanted to do the following but it obviously does not work due to my issue above. logger = MinLevelLogger(TransformerLogger(identity, ConsoleLogger()), Warn)
a = rand(1:2)
with_logger(TransformerLogger(log -> log._line = a, logger) do
# .... more stuff
end This will work, however all |
Regarding this, I think I misremembered the behavior. What I had was with_logger(TransformLogger(identity, ConsoleLogger(Info))) do
@debug error("Oh no!")
@info "B"
end (where the error came from an external package) So no 👻 yet :) |
Not currently. I could imagine we could introduce an Broadly speaking this is how our
|
I was surprised to see that
I don't understand why it is not
The text was updated successfully, but these errors were encountered: