mirror of https://github.com/status-im/timbre.git
`example-config` docstring hk
This commit is contained in:
parent
d75a2db4dd
commit
3dc9d6522b
|
@ -91,26 +91,35 @@
|
||||||
(def example-config
|
(def example-config
|
||||||
"APPENDERS
|
"APPENDERS
|
||||||
An appender is a map with keys:
|
An appender is a map with keys:
|
||||||
:doc, :min-level, :enabled?, :async?, :fn,
|
:doc ; (Optional) string.
|
||||||
:rate-limit ; [ncalls-limit window-ms],
|
:min-level ; (Optional) keyword, or nil (no minimum level).
|
||||||
:fmt-output-opts ; Extra opts passed to `fmt-output-fn`.
|
:enabled? ; (Optional).
|
||||||
|
:async? ; (Optional) dispatch using agent (good for slow appenders).
|
||||||
|
:rate-limit ; (Optional) [ncalls-limit window-ms].
|
||||||
|
:fmt-output-opts ; (Optional) extra opts passed to `fmt-output-fn`.
|
||||||
|
:fn ; (fn [appender-args-map]), with keys described below.
|
||||||
|
|
||||||
An appender's fn takes a single map with keys:
|
An appender's fn takes a single map with keys:
|
||||||
:level, :throwable
|
:level ; Keyword
|
||||||
:args, ; Raw logging macro args (as given to `info`, etc.).
|
:error? ; Is level an 'error' level?
|
||||||
:message, ; Stringified logging macro args, or nil.
|
:throwable ; java.lang.Throwable
|
||||||
|
:args ; Raw logging macro args (as given to `info`, etc.).
|
||||||
|
:message ; Stringified logging macro args, or nil.
|
||||||
:output ; Output of `fmt-output-fn`, used by built-in appenders
|
:output ; Output of `fmt-output-fn`, used by built-in appenders
|
||||||
; as final, formatted appender output.
|
; as final, formatted appender output.
|
||||||
:ap-config ; `shared-appender-config`.
|
:ap-config ; `shared-appender-config`.
|
||||||
:profile-stats ; From `profile` macro.
|
:profile-stats ; From `profile` macro.
|
||||||
And also: :instant, :timestamp, :hostname, :ns, :error?
|
:instant ; java.util.Date
|
||||||
|
:timestamp ; String generated from :timestamp-pattern, :timestamp-locale
|
||||||
|
:hostname ; String
|
||||||
|
:ns ; String
|
||||||
|
|
||||||
MIDDLEWARE
|
MIDDLEWARE
|
||||||
Middleware are fns (applied right-to-left) that transform the map
|
Middleware are fns (applied right-to-left) that transform the map
|
||||||
dispatched to appender fns. If any middleware returns nil, no dispatching
|
dispatched to appender fns. If any middleware returns nil, no dispatching
|
||||||
will occur (i.e. the event will be filtered).
|
will occur (i.e. the event will be filtered).
|
||||||
|
|
||||||
The `example-config` code contains more details.
|
The `example-config` code contains further settings and details.
|
||||||
See also `set-config!`, `merge-config!`, `set-level!`."
|
See also `set-config!`, `merge-config!`, `set-level!`."
|
||||||
|
|
||||||
{;;; Control log filtering by namespace patterns (e.g. ["my-app.*"]).
|
{;;; Control log filtering by namespace patterns (e.g. ["my-app.*"]).
|
||||||
|
|
Loading…
Reference in New Issue