(default-should-log-field-fn field-name {:keys [?err] :as _data})
Default function to determine whether to log fields.
Logs all fields except :file :line and :ns which are only logged on error.
Default function to determine whether to log fields. Logs all fields except :file :line and :ns which are only logged on error.
(handle-vargs log-map ?msg-fmt vargs inline-args? msg-key)
Handles varg parsing, adding the msg and the given context to the given log map.
If inline-args is true, then the remaining vargs are added to :args, otherwise they're inlined into the log-map.
Handles varg parsing, adding the msg and the given context to the given log map. If inline-args is true, then the remaining vargs are added to :args, otherwise they're inlined into the log-map.
(install)
(install {:keys [level min-level pretty inline-args? level-key msg-key
should-log-field-fn]
:or {level-key :level
pretty false
inline-args? true
msg-key :msg
should-log-field-fn default-should-log-field-fn}})
Installs json-appender as the sole appender for Timbre, options
level
: Timbre log level (deprecated, prefer min-level)
min-level
: Timbre log level
level-key
: The key to use for log-level
msg-key
: The key to use for the message (default :msg)
pretty
: Pretty-print JSON
inline-args?
: Place arguments on top level, instead of placing behing args
field
should-log-field-fn
: A function which determines whether to log the given top-level field. Defaults to default-should-log-field-fn
Installs json-appender as the sole appender for Timbre, options `level`: Timbre log level (deprecated, prefer min-level) `min-level`: Timbre log level `level-key`: The key to use for log-level `msg-key`: The key to use for the message (default :msg) `pretty`: Pretty-print JSON `inline-args?`: Place arguments on top level, instead of placing behing `args` field `should-log-field-fn`: A function which determines whether to log the given top-level field. Defaults to default-should-log-field-fn
(json-appender)
(json-appender {:keys [pretty inline-args? level-key msg-key
should-log-field-fn]
:or {pretty false
inline-args? false
level-key :level
msg-key :msg
should-log-field-fn default-should-log-field-fn}})
Creates Timbre configuration map for JSON appender
Creates Timbre configuration map for JSON appender
(wrap-json-logging handler)
Ring middleware for JSON logging. Logs :method, :uri and :status for successful handler invocations, :method and :uri for failed invocations.
Ring middleware for JSON logging. Logs :method, :uri and :status for successful handler invocations, :method and :uri for failed invocations.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close