Timbre 4.6.0
Pure Clojure/Script logging library.
Installation
To install, add the following dependency to your project or build file:
[com.taoensso/timbre "4.6.0"]
Namespaces
taoensso.timbre
Simple, flexible logging for Clojure/Script. No XML.
Public variables and functions:
- *config*
- *context*
- -elide?
- -levels-map
- -levels-set
- -levels-vec
- -log!
- -log-and-rethrow-errors
- -log-errors
- -logged-future
- -spy
- color-str
- compile-ns-filter
- debug
- debugf
- default-err
- default-out
- default-output-fn
- default-timestamp-opts
- error
- errorf
- example-config
- fatal
- fatalf
- get-?hostname
- get-?hostname_
- get-env
- get-hostname
- handle-uncaught-jvm-exceptions!
- info
- infof
- level>=
- log
- log!
- log*
- log-and-rethrow-errors
- log-env
- log-errors
- log?
- logf
- logf*
- logged-future
- logging-enabled?
- logp
- may-log?
- merge-config!
- ordered-levels
- println-appender
- refer-timbre
- report
- reportf
- set-config!
- set-level!
- sometimes
- spit-appender
- spy
- stacktrace
- str-println
- swap-config!
- trace
- tracef
- valid-level
- valid-level?
- warn
- warnf
- with-config
- with-context
- with-default-outs
- with-level
- with-log-level
- with-logging-config
- with-merged-config
taoensso.timbre.appenders.3rd-party.gelf
Appender that sends GELF messages to a centralized logging server +Timbre 4.7.0 Generated by Codox
Timbre 4.7.0
Timbre 4.7.0
Pure Clojure/Script logging library.
Installation
To install, add the following dependency to your project or build file:
[com.taoensso/timbre "4.7.0"]Namespaces
taoensso.timbre
Simple, flexible logging for Clojure/Script. No XML.Public variables and functions:
- *config*
- *context*
- -elide?
- -levels-map
- -levels-set
- -levels-vec
- -log!
- -log-and-rethrow-errors
- -log-errors
- -logged-future
- -spy
- color-str
- compile-ns-filter
- debug
- debugf
- default-err
- default-out
- default-output-fn
- default-timestamp-opts
- error
- errorf
- example-config
- fatal
- fatalf
- get-?hostname
- get-?hostname_
- get-env
- get-hostname
- handle-uncaught-jvm-exceptions!
- info
- infof
- level>=
- log
- log!
- log*
- log-and-rethrow-errors
- log-env
- log-errors
- log?
- logf
- logf*
- logged-future
- logging-enabled?
- logp
- may-log?
- merge-config!
- ordered-levels
- println-appender
- refer-timbre
- report
- reportf
- set-config!
- set-level!
- sometimes
- spit-appender
- spy
- stacktrace
- str-println
- swap-config!
- trace
- tracef
- valid-level
- valid-level?
- warn
- warnf
- with-config
- with-context
- with-default-outs
- with-level
- with-log-level
- with-logging-config
- with-merged-config
taoensso.timbre.appenders.3rd-party.gelf
Appender that sends GELF messages to a centralized logging server (e.g. Graylog). Requires https://github.com/Graylog2/gelfclient.Public variables and functions:
taoensso.timbre.appenders.3rd-party.irclj
IRC appender. Requires https://github.com/flatland/irclj.Public variables and functions:
taoensso.timbre.appenders.3rd-party.postgresql
JDBC PostgreSQL database appender. Requires https://github.com/clojure/java.jdbc, https://github.com/swaldman/c3p0.Public variables and functions:
taoensso.timbre.appenders.3rd-party.slack
Slack appender. Requires https://github.com/julienXX/clj-slack.Public variables and functions:
taoensso.timbre.appenders.carmine
Carmine (Redis) appender. diff --git a/taoensso.timbre.appenders.3rd-party.gelf.html b/taoensso.timbre.appenders.3rd-party.gelf.html index 80d4566..f35f339 100644 --- a/taoensso.timbre.appenders.3rd-party.gelf.html +++ b/taoensso.timbre.appenders.3rd-party.gelf.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.3rd-party.gelf documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.3rd-party.gelf
Appender that sends GELF messages to a centralized logging server +taoensso.timbre.appenders.3rd-party.gelf documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.appenders.3rd-party.gelf
Appender that sends GELF messages to a centralized logging server (e.g. Graylog). Requires https://github.com/Graylog2/gelfclient.gelf-appender
(gelf-appender gelf-server port)
(gelf-appender gelf-server port protocol)
Returns a Timbre appender that sends gelf messages to a remote host. Params: `gelf-server` - IP address or hostname string of the remote logging server `port` - TCP or UDP port on which the server listens diff --git a/taoensso.timbre.appenders.3rd-party.irclj.html b/taoensso.timbre.appenders.3rd-party.irclj.html index 8d4063f..44bfa08 100644 --- a/taoensso.timbre.appenders.3rd-party.irclj.html +++ b/taoensso.timbre.appenders.3rd-party.irclj.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.3rd-party.irclj documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.3rd-party.irclj
IRC appender. Requires https://github.com/flatland/irclj. +taoensso.timbre.appenders.3rd-party.irclj documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.appenders.3rd-party.irclj
IRC appender. Requires https://github.com/flatland/irclj.irclj-appender
(irclj-appender irc-config)
Returns an IRC appender. (irc-appender {:host "irc.example.org" :port 6667 :nick "logger" diff --git a/taoensso.timbre.appenders.3rd-party.postgresql.html b/taoensso.timbre.appenders.3rd-party.postgresql.html index 09414dd..3130917 100644 --- a/taoensso.timbre.appenders.3rd-party.postgresql.html +++ b/taoensso.timbre.appenders.3rd-party.postgresql.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.3rd-party.postgresql documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.3rd-party.postgresql
JDBC PostgreSQL database appender. +taoensso.timbre.appenders.3rd-party.postgresql documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.appenders.3rd-party.postgresql
JDBC PostgreSQL database appender. Requires https://github.com/clojure/java.jdbc, https://github.com/swaldman/c3p0.pgsql-appender
(pgsql-appender db-config)
Returns a JDBC PostgreSQL appender. (pglog-appender {:server {:host "127.0.0.1" :port 5432}}) diff --git a/taoensso.timbre.appenders.3rd-party.rolling.html b/taoensso.timbre.appenders.3rd-party.rolling.html index c56cfa3..2c5f7a0 100644 --- a/taoensso.timbre.appenders.3rd-party.rolling.html +++ b/taoensso.timbre.appenders.3rd-party.rolling.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.3rd-party.rolling documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.3rd-party.rolling
Rolling file appender. +taoensso.timbre.appenders.3rd-party.rolling documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.appenders.3rd-party.rolling
Rolling file appender.make-rolling-appender
(make-rolling-appender & [appender-merge opts])
DEPRECATED. Please use `rolling-appender` instead.rolling-appender
(rolling-appender & [{:keys [path pattern], :or {path "./timbre-rolling.log", pattern :daily}}])
Returns a Rolling file appender. Opts: :path - logfile path. diff --git a/taoensso.timbre.appenders.3rd-party.rotor.html b/taoensso.timbre.appenders.3rd-party.rotor.html index aa25178..1a844b5 100644 --- a/taoensso.timbre.appenders.3rd-party.rotor.html +++ b/taoensso.timbre.appenders.3rd-party.rotor.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.3rd-party.rotor documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.3rd-party.rotor
Rotating file appender. +taoensso.timbre.appenders.3rd-party.rotor documentation Generated by Codox
Timbre 4.7.0
\ No newline at end of file diff --git a/taoensso.timbre.appenders.3rd-party.slack.html b/taoensso.timbre.appenders.3rd-party.slack.html index a4804df..23be2dd 100644 --- a/taoensso.timbre.appenders.3rd-party.slack.html +++ b/taoensso.timbre.appenders.3rd-party.slack.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.3rd-party.rotor
Rotating file appender.make-rotor-appender
(make-rotor-appender & [appender-merge opts])
DEPRECATED. Please use `rotor-appender` instead.rotor-appender
(rotor-appender & [{:keys [path max-size backlog], :or {path "./timbre-rotor.log", max-size (* 1024 1024), backlog 5}}])
Returns a rotating file appender.taoensso.timbre.appenders.3rd-party.slack documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.3rd-party.slack
Slack appender. Requires https://github.com/julienXX/clj-slack. +taoensso.timbre.appenders.3rd-party.slack documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.appenders.3rd-party.slack
Slack appender. Requires https://github.com/julienXX/clj-slack.slack-appender
(slack-appender & [opts])
Returns Slack appender. Required params: `token` - Slack API token. See: Browse apps > Custom Integrations > Bots `channel` - Channel ID diff --git a/taoensso.timbre.appenders.carmine.html b/taoensso.timbre.appenders.carmine.html index 1df0519..af3cf22 100644 --- a/taoensso.timbre.appenders.carmine.html +++ b/taoensso.timbre.appenders.carmine.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.carmine documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.carmine
Carmine (Redis) appender. +taoensso.timbre.appenders.carmine documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.appenders.carmine
Carmine (Redis) appender. Requires https://github.com/ptaoussanis/carmine.carmine-appender
(carmine-appender & [{:keys [conn-opts keyfn entry-fn nentries-by-level], :or {keyfn default-keyfn, entry-fn default-entry-fn, nentries-by-level default-nentries-by-level}}])
Alpha, subject to change. Returns a Carmine Redis appender: diff --git a/taoensso.timbre.appenders.core.html b/taoensso.timbre.appenders.core.html index 1313f0d..3e69d1f 100644 --- a/taoensso.timbre.appenders.core.html +++ b/taoensso.timbre.appenders.core.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.core documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.core
Core Timbre appenders without any special dependency requirements. +taoensso.timbre.appenders.core documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.appenders.core
Core Timbre appenders without any special dependency requirements. These can be aliased into the main Timbre ns for convenience.println-appender
(println-appender & [{:keys [stream], :or {stream :auto}}])
Returns a simple `println` appender for Clojure/Script. Use with ClojureScript requires that `cljs.core/*print-fn*` be set. diff --git a/taoensso.timbre.appenders.example.html b/taoensso.timbre.appenders.example.html index de05e2d..38ba83b 100644 --- a/taoensso.timbre.appenders.example.html +++ b/taoensso.timbre.appenders.example.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.example documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.example
You can copy this namespace if you'd like a starting template for +taoensso.timbre.appenders.example documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.appenders.example
You can copy this namespace if you'd like a starting template for writing your own Timbre appender. PRs for new appenders welcome! TODO Please document any dependency GitHub links here, e.g.: diff --git a/taoensso.timbre.appenders.postal.html b/taoensso.timbre.appenders.postal.html index 1eeeeb8..909d1b1 100644 --- a/taoensso.timbre.appenders.postal.html +++ b/taoensso.timbre.appenders.postal.html @@ -1,6 +1,6 @@ -taoensso.timbre.appenders.postal documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.appenders.postal
Email (Postal) appender. Requires https://github.com/drewr/postal. +taoensso.timbre.appenders.postal documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.appenders.postal
Email (Postal) appender. Requires https://github.com/drewr/postal.make-postal-appender
(make-postal-appender & [appender-merge opts])
DEPRECATED. Please use `postal-appender` instead.postal-appender
(postal-appender postal-config & [{:keys [subject-len body-fn], :or {subject-len 150, body-fn (fn [output-str] [{:type "text/plain; charset=utf-8", :content output-str}])}}])
\ No newline at end of file diff --git a/taoensso.timbre.profiling.html b/taoensso.timbre.profiling.html index 151f24c..589a58c 100644 --- a/taoensso.timbre.profiling.html +++ b/taoensso.timbre.profiling.html @@ -1,6 +1,6 @@ -Returns a Postal email appender. (postal-appender diff --git a/taoensso.timbre.html b/taoensso.timbre.html index 15bb595..f566c51 100644 --- a/taoensso.timbre.html +++ b/taoensso.timbre.html @@ -1,13 +1,13 @@ -taoensso.timbre documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre
Simple, flexible logging for Clojure/Script. No XML. +taoensso.timbre documentation Generated by Codox
Timbre 4.7.0
\ No newline at end of file +Defaults to :debug logging level and unevaluated expression as name.taoensso.timbre
Simple, flexible logging for Clojure/Script. No XML.*context*
dynamic
General-purpose dynamic logging context. Context will be included in -appender data map at logging time.-log!
(-log! config level ?ns-str ?file ?line msg-type ?err vargs_ ?base-data)
(-log! config level ?ns-str ?file ?line msg-type ?err vargs_ ?base-data callsite-id)
Core low-level log fn. Implementation detail! -default-output-fn
(default-output-fn data)
(default-output-fn opts data)
Default (fn [data]) -> string output fn. +*context*
dynamic
General-purpose dynamic logging context. Context will be included in +appender data map at logging time.-log!
(-log! config level ?ns-str ?file ?line msg-type ?err vargs_ ?base-data)
(-log! config level ?ns-str ?file ?line msg-type ?err vargs_ ?base-data callsite-id)
Core low-level log fn. Implementation detail! +default-output-fn
(default-output-fn data)
(default-output-fn opts data)
Default (fn [data]) -> string output fn. Use`(partial default-output-fn <opts-map>)` to modify default opts.example-config
Example (+default) Timbre v4 config map. APPENDERS An appender is a map with keys: @@ -19,6 +19,7 @@ APPENDERS :timestamp-opts ; Optional override for inherited {:pattern _ :locale _ :timezone _} :ns-whitelist ; Optional, stacks with active config's whitelist :ns-blacklist ; Optional, stacks with active config's blacklist + :middleware-fn ; Optional, stacks with active config's middleware :fn ; (fn [data]) -> side effects, with keys described below An appender's fn takes a single data map with keys: @@ -51,27 +52,27 @@ MIDDLEWARE returns nil, NO dispatch will occur (i.e. the event will be filtered). The `example-config` source code contains further settings and details. -See also `set-config!`, `merge-config!`, `set-level!`.handle-uncaught-jvm-exceptions!
(handle-uncaught-jvm-exceptions! & [handler])
Sets JVM-global DefaultUncaughtExceptionHandler. -log!
macro
(log! level msg-type args & [opts])
Core low-level log macro. Useful for tooling, etc. +See also `set-config!`, `merge-config!`, `set-level!`.handle-uncaught-jvm-exceptions!
(handle-uncaught-jvm-exceptions! & [handler])
Sets JVM-global DefaultUncaughtExceptionHandler. +log!
macro
(log! level msg-type args & [opts])
Core low-level log macro. Useful for tooling, etc. * `level` - must eval to a valid logging level * `msg-type` - must eval to e/o #{:p :f nil} * `opts` - ks e/o #{:config :?err :?ns-str :?file :?line :?base-data} Supports compile-time elision when compile-time const vals -provided for `level` and/or `?ns-str`.may-log?
(may-log? level)
(may-log? level ?ns-str)
(may-log? level ?ns-str ?config)
Runtime check: would Timbre currently log at the given logging level? +provided for `level` and/or `?ns-str`.may-log?
(may-log? level)
(may-log? level ?ns-str)
(may-log? level ?ns-str ?config)
Runtime check: would Timbre currently log at the given logging level? * `?ns-str` arg required to support ns filtering -* `config` arg required to support non-global configprintln-appender
(println-appender & [{:keys [stream], :or {stream :auto}}])
Returns a simple `println` appender for Clojure/Script. +* `config` arg required to support non-global configprintln-appender
(println-appender & [{:keys [stream], :or {stream :auto}}])
Returns a simple `println` appender for Clojure/Script. Use with ClojureScript requires that `cljs.core/*print-fn*` be set. :stream (clj only) - e/o #{:auto :*out* :*err* :std-err :std-out <io-stream>}.refer-timbre
(refer-timbre)
Shorthand for: (require '[taoensso.timbre :as timbre :refer (log trace debug info warn error fatal report logf tracef debugf infof warnf errorf fatalf reportf - spy get-env log-env)])spit-appender
(spit-appender & [{:keys [fname], :or {fname "./timbre-spit.log"}}])
Returns a simple `spit` file appender for Clojure. + spy get-env log-env)])spit-appender
(spit-appender & [{:keys [fname], :or {fname "./timbre-spit.log"}}])
Returns a simple `spit` file appender for Clojure.spy
macro
(spy expr)
(spy level expr)
(spy level name expr)
(spy config level name expr)
Evaluates named expression and logs its result. Always returns the result. -Defaults to :debug logging level and unevaluated expression as name.taoensso.timbre.profiling documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.profiling
DEPRECATED, further development work will be focused on +taoensso.timbre.profiling documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.profiling
DEPRECATED, further development work will be focused on Tufte at https://github.com/ptaoussanis/tufte.*pdata*
dynamic
{::pid {:times [t1 t2 ...] ; Times awaiting merge into stats :ntimes _ ; (count times) :stats {} ; Cumulative stats diff --git a/taoensso.timbre.tools.logging.html b/taoensso.timbre.tools.logging.html index 54aec98..423839c 100644 --- a/taoensso.timbre.tools.logging.html +++ b/taoensso.timbre.tools.logging.html @@ -1,6 +1,6 @@ -taoensso.timbre.tools.logging documentation Generated by Codox
Timbre 4.6.0
taoensso.timbre.tools.logging
`clojure.tools.logging.impl/Logger` implementation. +taoensso.timbre.tools.logging documentation Generated by Codox
Timbre 4.7.0
taoensso.timbre.tools.logging
`clojure.tools.logging.impl/Logger` implementation. Please note that the tools.logging API has some significant limits that native Timbre does not. Would strongly recommend against using