diff --git a/index.html b/index.html index 3fa2c2a..5326e23 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ -Timbre 4.6.0

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.

taoensso.timbre.appenders.3rd-party.gelf

Appender that sends GELF messages to a centralized logging server
+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.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.rolling

Rolling file appender.

Public variables and functions:

taoensso.timbre.appenders.3rd-party.rotor

Rotating file appender.

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

taoensso.timbre.appenders.3rd-party.gelf

Appender that sends GELF messages to a centralized logging server
+taoensso.timbre.appenders.3rd-party.gelf documentation

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

taoensso.timbre.appenders.3rd-party.irclj

IRC appender. Requires https://github.com/flatland/irclj.
+taoensso.timbre.appenders.3rd-party.irclj documentation

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

taoensso.timbre.appenders.3rd-party.postgresql

JDBC PostgreSQL database appender.
+taoensso.timbre.appenders.3rd-party.postgresql documentation

taoensso.timbre.appenders.3rd-party.postgresql

JDBC PostgreSQL database appender.
 Requires https://github.com/clojure/java.jdbc,
          https://github.com/swaldman/c3p0.

connect

(connect config)

default-pool-spec

ensure-conn

(ensure-conn config)

log-message

(log-message config data)

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

taoensso.timbre.appenders.3rd-party.rolling

Rolling file appender.
+taoensso.timbre.appenders.3rd-party.rolling documentation

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

taoensso.timbre.appenders.3rd-party.rotor

Rotating file appender.
+taoensso.timbre.appenders.3rd-party.rotor documentation

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.
 
\ 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.slack documentation

taoensso.timbre.appenders.3rd-party.slack

Slack appender. Requires https://github.com/julienXX/clj-slack.
+taoensso.timbre.appenders.3rd-party.slack documentation

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

taoensso.timbre.appenders.carmine

Carmine (Redis) appender.
+taoensso.timbre.appenders.carmine documentation

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

taoensso.timbre.appenders.core

Core Timbre appenders without any special dependency requirements.
+taoensso.timbre.appenders.core documentation

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

taoensso.timbre.appenders.example

You can copy this namespace if you'd like a starting template for
+taoensso.timbre.appenders.example documentation

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

taoensso.timbre.appenders.postal

Email (Postal) appender. Requires https://github.com/drewr/postal.
+taoensso.timbre.appenders.postal documentation

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}])}}])
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

taoensso.timbre

Simple, flexible logging for Clojure/Script. No XML.
+taoensso.timbre documentation

taoensso.timbre

Simple, flexible logging for Clojure/Script. No XML.
 

*config*

dynamic

See `example-config` for info.
-

*context*

dynamic

General-purpose dynamic logging context. Context will be included in
-appender data map at logging time.

-elide?

(-elide? level-form ns-str-form)

-levels-map

-levels-set

-levels-vec

-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!
-

-log-and-rethrow-errors

macro

(-log-and-rethrow-errors ?line & body)

-log-errors

macro

(-log-errors ?line & body)

-logged-future

macro

(-logged-future ?line & body)

-spy

macro

(-spy ?line config level name expr)

color-str

(color-str color & xs)

compile-ns-filter

Returns (fn [?ns]) -> truthy.
-

debug

macro

(debug & args)

debugf

macro

(debugf & args)

default-err

default-out

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.

-elide?

(-elide? level-form ns-str-form)

-levels-map

-levels-set

-levels-vec

-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!
+

-log-and-rethrow-errors

macro

(-log-and-rethrow-errors ?line & body)

-log-errors

macro

(-log-errors ?line & body)

-logged-future

macro

(-logged-future ?line & body)

-spy

macro

(-spy ?line config level name expr)

color-str

(color-str color & xs)

compile-ns-filter

Returns (fn [?ns]) -> truthy.
+

debug

macro

(debug & args)

debugf

macro

(debugf & args)

default-err

default-out

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.

default-timestamp-opts

Controls (:timestamp_ data)
-

error

macro

(error & args)

errorf

macro

(errorf & args)

example-config

Example (+default) Timbre v4 config map.
+

error

macro

(error & args)

errorf

macro

(errorf & args)

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!`.

fatal

macro

(fatal & args)

fatalf

macro

(fatalf & args)

get-?hostname

(get-?hostname)
Returns live local hostname, or nil.
-

get-?hostname_

(get-?hostname_)
Returns a new `(get-?hostname)` promise.
-

get-env

macro

(get-env)

get-hostname

Returns cached hostname string.
-

handle-uncaught-jvm-exceptions!

(handle-uncaught-jvm-exceptions! & [handler])
Sets JVM-global DefaultUncaughtExceptionHandler.
-

info

macro

(info & args)

infof

macro

(infof & args)

level>=

(level>= x y)

log

macro

(log level & args)

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!`.

fatal

macro

(fatal & args)

fatalf

macro

(fatalf & args)

get-?hostname

(get-?hostname)
Returns live local hostname, or nil.
+

get-?hostname_

(get-?hostname_)
Returns a new `(get-?hostname)` promise.
+

get-env

macro

(get-env)

get-hostname

Returns cached hostname string.
+

handle-uncaught-jvm-exceptions!

(handle-uncaught-jvm-exceptions! & [handler])
Sets JVM-global DefaultUncaughtExceptionHandler.
+

info

macro

(info & args)

infof

macro

(infof & args)

level>=

(level>= x y)

log

macro

(log level & args)

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`.

log*

macro

(log* config level & args)

log-and-rethrow-errors

macro

(log-and-rethrow-errors & body)

log-env

macro

(log-env)(log-env level)(log-env level name)(log-env config level name)

log-errors

macro

(log-errors & body)

logf

macro

(logf level & args)

logf*

macro

(logf* config level & args)

logged-future

macro

(logged-future & body)

logging-enabled?

(logging-enabled? level compile-time-ns)

logp

macro

(logp & sigs)

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`.

log*

macro

(log* config level & args)

log-and-rethrow-errors

macro

(log-and-rethrow-errors & body)

log-env

macro

(log-env)(log-env level)(log-env level name)(log-env config level name)

log-errors

macro

(log-errors & body)

logf

macro

(logf level & args)

logf*

macro

(logf* config level & args)

logged-future

macro

(logged-future & body)

logging-enabled?

(logging-enabled? level compile-time-ns)

logp

macro

(logp & sigs)

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 config

merge-config!

(merge-config! m)

ordered-levels

println-appender

(println-appender & [{:keys [stream], :or {stream :auto}}])
Returns a simple `println` appender for Clojure/Script.
+* `config`  arg required to support non-global config

merge-config!

(merge-config! m)

ordered-levels

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.
 
 :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)])

report

macro

(report & args)

reportf

macro

(reportf & args)

set-config!

(set-config! m)

set-level!

(set-level! level)

sometimes

macro

(sometimes probability & body)
Handy for sampled logging, etc.
-

spit-appender

(spit-appender & [{:keys [fname], :or {fname "./timbre-spit.log"}}])
Returns a simple `spit` file appender for Clojure.
+                   spy get-env log-env)])

report

macro

(report & args)

reportf

macro

(reportf & args)

set-config!

(set-config! m)

set-level!

(set-level! level)

sometimes

macro

(sometimes probability & body)
Handy for sampled logging, etc.
+

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.

stacktrace

(stacktrace err)(stacktrace err opts)

str-println

(str-println & xs)

swap-config!

(swap-config! f & args)

trace

macro

(trace & args)

tracef

macro

(tracef & args)

valid-level

(valid-level x)

valid-level?

(valid-level? x)

warn

macro

(warn & args)

warnf

macro

(warnf & args)

with-config

macro

(with-config config & body)

with-context

macro

(with-context context & body)

with-default-outs

macro

(with-default-outs & body)

with-level

macro

(with-level level & body)

with-log-level

macro

(with-log-level level & body)

with-logging-config

macro

(with-logging-config config & body)

with-merged-config

macro

(with-merged-config config & body)
\ No newline at end of file +Defaults to :debug logging level and unevaluated expression as name.

stacktrace

(stacktrace err)(stacktrace err opts)

str-println

(str-println & xs)

swap-config!

(swap-config! f & args)

trace

macro

(trace & args)

tracef

macro

(tracef & args)

valid-level

(valid-level x)

valid-level?

(valid-level? x)

warn

macro

(warn & args)

warnf

macro

(warnf & args)

with-config

macro

(with-config config & body)

with-context

macro

(with-context context & body)

with-default-outs

macro

(with-default-outs & body)

with-level

macro

(with-level level & body)

with-log-level

macro

(with-log-level level & body)

with-logging-config

macro

(with-logging-config config & body)

with-merged-config

macro

(with-merged-config config & body)
\ 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 @@ -taoensso.timbre.profiling documentation

taoensso.timbre.profiling

DEPRECATED, further development work will be focused on
+taoensso.timbre.profiling documentation

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

taoensso.timbre.tools.logging

`clojure.tools.logging.impl/Logger` implementation.
+taoensso.timbre.tools.logging documentation

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