mirror of https://github.com/status-im/timbre.git
[#213] README: add example for disabling/removing appenders
This commit is contained in:
parent
6526637160
commit
44499d02e9
21
README.md
21
README.md
|
@ -251,6 +251,18 @@ lein uberjar # Compile jar ''
|
||||||
|
|
||||||
### Built-in appenders
|
### Built-in appenders
|
||||||
|
|
||||||
|
#### Basic file appender
|
||||||
|
|
||||||
|
```clojure
|
||||||
|
;; (:require [taoensso.timbre.appenders.core :as appenders]) ; Add to ns
|
||||||
|
|
||||||
|
(timbre/merge-config!
|
||||||
|
{:appenders {:spit (appenders/spit-appender {:fname "/path/my-file.log"})}})
|
||||||
|
|
||||||
|
;; (timbre/merge-config! {:appenders {:spit {:enabled? false}}} ; To disable
|
||||||
|
;; (timbre/merge-config! {:appenders {:spit nil}} ; To remove entirely
|
||||||
|
```
|
||||||
|
|
||||||
#### Redis ([Carmine]) appender (v3+)
|
#### Redis ([Carmine]) appender (v3+)
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
|
@ -285,15 +297,6 @@ See also `car-appender/query-entries`.
|
||||||
{:from "me@draines.com" :to "foo@example.com"})}})
|
{:from "me@draines.com" :to "foo@example.com"})}})
|
||||||
```
|
```
|
||||||
|
|
||||||
#### File appender
|
|
||||||
|
|
||||||
```clojure
|
|
||||||
;; (:require [taoensso.timbre.appenders.core :as appenders]) ; Add to ns
|
|
||||||
|
|
||||||
(timbre/merge-config!
|
|
||||||
{:appenders {:spit (appenders/spit-appender {:fname "/path/my-file.log"})}})
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Other included appenders
|
#### Other included appenders
|
||||||
|
|
||||||
A number of 3rd-party appenders are included out-the-box [here](https://github.com/ptaoussanis/timbre/tree/master/src/taoensso/timbre/appenders/3rd_party). **Please see the relevant docstring for details**. Thanks goes to the respective authors!
|
A number of 3rd-party appenders are included out-the-box [here](https://github.com/ptaoussanis/timbre/tree/master/src/taoensso/timbre/appenders/3rd_party). **Please see the relevant docstring for details**. Thanks goes to the respective authors!
|
||||||
|
|
Loading…
Reference in New Issue