Skip to content

Commit

Permalink
[doc] [#43] Note that ns filters work for SLF4J logger names (@lvh)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvh authored and ptaoussanis committed Dec 31, 2024
1 parent 0e642ba commit db0498b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ It enables you to write code that is **information-verbose by default**.
(t/set-min-level! :warn) ; For all signals
(t/set-min-level! :log :debug) ; For `log!` signals only

;; Set namespace and id filters
(t/set-ns-filter! {:disallow "taoensso.*" :allow "taoensso.sente.*"})
;; Set id and namespace filters
(t/set-id-filter! {:allow #{::my-particular-id "my-app/*"}})
(t/set-ns-filter! {:disallow "taoensso.*" :allow "taoensso.sente.*"})

;; SLF4J signals will have their `:ns` key set to the logger's name
;; (typically a source class)
(t/set-ns-filter! {:disallow "com.noisy.java.package.*"})

;; Set minimum level for `event!` signals for particular ns pattern
(t/set-min-level! :event "taoensso.sente.*" :warn)
Expand Down

0 comments on commit db0498b

Please sign in to comment.