-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
how to use :min-level at the appender level based on namespace? #390
Comments
@ftravers Hi Fenton! This should work, and seems to work on my side- (binding [timbre/*config*
{:min-level :info
:appenders
{:my-appender
{:enabled? true
:min-level [[#{"*"} :warn]]
:fn (fn [_] (println "Handler called"))}}}]
(timbre/info "Test"))
Is it different on your side? If so, what version of Timbre are you using? |
I seem to be having a similar issue, and I'm assuming I just don't understand how the namespace selectors work. I'm using timbre 6.5.0 in a lein project. Trying to get to a sane baseline, I put the following line in
I assumed that that would prevent any log messages below INFO, but I'm still getting DEBUG log messages. If I instead use
this works to suppress any messages below the level of INFO, but then I lack the granularity to set levels based on namespaces. Any ideas what I may be doing wrong with my usage of |
@jayemar Hi Joe,
Just to confirm, this is literally the exact binding expression that you used? If so, that won't do anything since Clojure's The docstring explains this in some more detail. If you want to set Timbre's minimum level throughout your program, you can call There's some more info on general config here. Just let me know if any of that is unclear 👍 |
The docs say:
"Note that both :min-level and :ns-filter can also be easily overridden on a per-appender basis."
and I'm using a :min-level like:
but when I use that appender it still logs 'info' log levels?
The text was updated successfully, but these errors were encountered: