timbre/taoensso.timbre.html

77 lines
42 KiB
HTML

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><link href="css/default.css" rel="stylesheet" type="text/css" /><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>taoensso.timbre documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Timbre</span> <span class="project-version">4.6.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>taoensso</span></div></div></li><li class="depth-2 current"><a href="taoensso.timbre.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>timbre</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>appenders</span></div></div></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>3rd-party</span></div></div></li><li class="depth-5 branch"><a href="taoensso.timbre.appenders.3rd-party.gelf.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gelf</span></div></a></li><li class="depth-5 branch"><a href="taoensso.timbre.appenders.3rd-party.irclj.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>irclj</span></div></a></li><li class="depth-5 branch"><a href="taoensso.timbre.appenders.3rd-party.postgresql.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>postgresql</span></div></a></li><li class="depth-5 branch"><a href="taoensso.timbre.appenders.3rd-party.rolling.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>rolling</span></div></a></li><li class="depth-5 branch"><a href="taoensso.timbre.appenders.3rd-party.rotor.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>rotor</span></div></a></li><li class="depth-5"><a href="taoensso.timbre.appenders.3rd-party.slack.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>slack</span></div></a></li><li class="depth-4 branch"><a href="taoensso.timbre.appenders.carmine.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>carmine</span></div></a></li><li class="depth-4 branch"><a href="taoensso.timbre.appenders.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-4 branch"><a href="taoensso.timbre.appenders.example.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>example</span></div></a></li><li class="depth-4"><a href="taoensso.timbre.appenders.postal.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>postal</span></div></a></li><li class="depth-3 branch"><a href="taoensso.timbre.profiling.html"><div class="inner"><span class="tree" style="top: -362px;"><span class="top" style="height: 371px;"></span><span class="bottom"></span></span><span>profiling</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tools</span></div></div></li><li class="depth-4"><a href="taoensso.timbre.tools.logging.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logging</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="taoensso.timbre.html#var-*config*"><div class="inner"><span>*config*</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var--elide.3F"><div class="inner"><span>-elide?</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var--levels-map"><div class="inner"><span>-levels-map</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var--levels-set"><div class="inner"><span>-levels-set</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var--levels-vec"><div class="inner"><span>-levels-vec</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var--log.21"><div class="inner"><span>-log!</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var--log-and-rethrow-errors"><div class="inner"><span>-log-and-rethrow-errors</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var--log-errors"><div class="inner"><span>-log-errors</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var--logged-future"><div class="inner"><span>-logged-future</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var--spy"><div class="inner"><span>-spy</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-color-str"><div class="inner"><span>color-str</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-compile-ns-filter"><div class="inner"><span>compile-ns-filter</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-debug"><div class="inner"><span>debug</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-debugf"><div class="inner"><span>debugf</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-default-err"><div class="inner"><span>default-err</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-default-out"><div class="inner"><span>default-out</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-default-output-fn"><div class="inner"><span>default-output-fn</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-default-timestamp-opts"><div class="inner"><span>default-timestamp-opts</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-error"><div class="inner"><span>error</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-errorf"><div class="inner"><span>errorf</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-example-config"><div class="inner"><span>example-config</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-fatal"><div class="inner"><span>fatal</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-fatalf"><div class="inner"><span>fatalf</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-get-.3Fhostname"><div class="inner"><span>get-?hostname</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-get-.3Fhostname_"><div class="inner"><span>get-?hostname_</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-get-env"><div class="inner"><span>get-env</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-get-hostname"><div class="inner"><span>get-hostname</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-handle-uncaught-jvm-exceptions.21"><div class="inner"><span>handle-uncaught-jvm-exceptions!</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-info"><div class="inner"><span>info</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-infof"><div class="inner"><span>infof</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-level.3E.3D"><div class="inner"><span>level&gt;=</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-log.21"><div class="inner"><span>log!</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-log*"><div class="inner"><span>log*</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-log-and-rethrow-errors"><div class="inner"><span>log-and-rethrow-errors</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-log-env"><div class="inner"><span>log-env</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-log-errors"><div class="inner"><span>log-errors</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-log.3F"><div class="inner"><span>log?</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-logf"><div class="inner"><span>logf</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-logf*"><div class="inner"><span>logf*</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-logged-future"><div class="inner"><span>logged-future</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-logging-enabled.3F"><div class="inner"><span>logging-enabled?</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-logp"><div class="inner"><span>logp</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-may-log.3F"><div class="inner"><span>may-log?</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-merge-config.21"><div class="inner"><span>merge-config!</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-ordered-levels"><div class="inner"><span>ordered-levels</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-println-appender"><div class="inner"><span>println-appender</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-refer-timbre"><div class="inner"><span>refer-timbre</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-report"><div class="inner"><span>report</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-reportf"><div class="inner"><span>reportf</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-set-config.21"><div class="inner"><span>set-config!</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-set-level.21"><div class="inner"><span>set-level!</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-sometimes"><div class="inner"><span>sometimes</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-spit-appender"><div class="inner"><span>spit-appender</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-spy"><div class="inner"><span>spy</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-stacktrace"><div class="inner"><span>stacktrace</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-str-println"><div class="inner"><span>str-println</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-swap-config.21"><div class="inner"><span>swap-config!</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-trace"><div class="inner"><span>trace</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-tracef"><div class="inner"><span>tracef</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-valid-level"><div class="inner"><span>valid-level</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-valid-level.3F"><div class="inner"><span>valid-level?</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-warn"><div class="inner"><span>warn</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-warnf"><div class="inner"><span>warnf</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-with-config"><div class="inner"><span>with-config</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-with-default-outs"><div class="inner"><span>with-default-outs</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-with-level"><div class="inner"><span>with-level</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-with-log-level"><div class="inner"><span>with-log-level</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-with-logging-config"><div class="inner"><span>with-logging-config</span></div></a></li><li class="depth-1"><a href="taoensso.timbre.html#var-with-merged-config"><div class="inner"><span>with-merged-config</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">taoensso.timbre</h1><div class="doc"><pre class="plaintext">Simple, flexible logging for Clojure/Script. No XML.
</pre></div><div class="public anchor" id="var-*config*"><h3>*config*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext">See `example-config` for info.
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L135">view source</a></div></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext">General-purpose dynamic logging context. Context will be included in
appender data map at logging time.</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L337">view source</a></div></div><div class="public anchor" id="var--elide.3F"><h3>-elide?</h3><div class="usage"><code>(-elide? level-form ns-str-form)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L272">view source</a></div></div><div class="public anchor" id="var--levels-map"><h3>-levels-map</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L159">view source</a></div></div><div class="public anchor" id="var--levels-set"><h3>-levels-set</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L158">view source</a></div></div><div class="public anchor" id="var--levels-vec"><h3>-levels-vec</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L157">view source</a></div></div><div class="public anchor" id="var--log.21"><h3>-log!</h3><div class="usage"><code>(-log! config level ?ns-str ?file ?line msg-type ?err vargs_ ?base-data)</code><code>(-log! config level ?ns-str ?file ?line msg-type ?err vargs_ ?base-data callsite-id)</code></div><div class="doc"><pre class="plaintext">Core low-level log fn. Implementation detail!
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L396">view source</a></div></div><div class="public anchor" id="var--log-and-rethrow-errors"><h3>-log-and-rethrow-errors</h3><h4 class="type">macro</h4><div class="usage"><code>(-log-and-rethrow-errors ?line &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L643">view source</a></div></div><div class="public anchor" id="var--log-errors"><h3>-log-errors</h3><h4 class="type">macro</h4><div class="usage"><code>(-log-errors ?line &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L636">view source</a></div></div><div class="public anchor" id="var--logged-future"><h3>-logged-future</h3><h4 class="type">macro</h4><div class="usage"><code>(-logged-future ?line &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L651">view source</a></div></div><div class="public anchor" id="var--spy"><h3>-spy</h3><h4 class="type">macro</h4><div class="usage"><code>(-spy ?line config level name expr)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L677">view source</a></div></div><div class="public anchor" id="var-color-str"><h3>color-str</h3><div class="usage"><code>(color-str color &amp; xs)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L718">view source</a></div></div><div class="public anchor" id="var-compile-ns-filter"><h3>compile-ns-filter</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Returns (fn [?ns]) -&gt; truthy.
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L175">view source</a></div></div><div class="public anchor" id="var-debug"><h3>debug</h3><h4 class="type">macro</h4><div class="usage"><code>(debug &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L613">view source</a></div></div><div class="public anchor" id="var-debugf"><h3>debugf</h3><h4 class="type">macro</h4><div class="usage"><code>(debugf &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L624">view source</a></div></div><div class="public anchor" id="var-default-err"><h3>default-err</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L727">view source</a></div></div><div class="public anchor" id="var-default-out"><h3>default-out</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L726">view source</a></div></div><div class="public anchor" id="var-default-output-fn"><h3>default-output-fn</h3><div class="usage"><code>(default-output-fn data)</code><code>(default-output-fn opts data)</code></div><div class="doc"><pre class="plaintext">Default (fn [data]) -&gt; string output fn.
Use`(partial default-output-fn &lt;opts-map&gt;)` to modify default opts.</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L34">view source</a></div></div><div class="public anchor" id="var-default-timestamp-opts"><h3>default-timestamp-opts</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Controls (:timestamp_ data)
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L27">view source</a></div></div><div class="public anchor" id="var-error"><h3>error</h3><h4 class="type">macro</h4><div class="usage"><code>(error &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L616">view source</a></div></div><div class="public anchor" id="var-errorf"><h3>errorf</h3><h4 class="type">macro</h4><div class="usage"><code>(errorf &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L627">view source</a></div></div><div class="public anchor" id="var-example-config"><h3>example-config</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Example (+default) Timbre v4 config map.
APPENDERS
An appender is a map with keys:
:min-level ; Level keyword, or nil (=&gt; no minimum level)
:enabled? ;
:async? ; Dispatch using agent? Useful for slow appenders (clj only)
:rate-limit ; [[ncalls-limit window-ms] &lt;...&gt;], or nil
:output-fn ; Optional override for inherited (fn [data]) -&gt; string
: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
:fn ; (fn [data]) -&gt; side effects, with keys described below
An appender's fn takes a single data map with keys:
:config ; Entire config map (this map, etc.)
:appender-id ; Id of appender currently dispatching
:appender ; Entire map of appender currently dispatching
:instant ; Platform date (java.util.Date or js/Date)
:level ; Keyword
:error-level? ; Is level e/o #{:error :fatal}?
:?ns-str ; String, or nil
:?file ; String, or nil
:?line ; Integer, or nil ; Waiting on CLJ-865
:?err ; First-arg platform error, or nil
:vargs ; Vector of raw args
:output_ ; Forceable - final formatted output string created
; by calling (output-fn &lt;this-data-map&gt;)
:msg_ ; Forceable - args as a string
:timestamp_ ; Forceable - string
:hostname_ ; Forceable - string (clj only)
:output-fn ; (fn [data]) -&gt; formatted output string
; (see `default-output-fn` for details)
:context ; *context* value at log time (see `with-context`)
**NB** - any keys not specifically documented here should be
considered private / subject to change without notice.
MIDDLEWARE
Middleware are simple (fn [data]) -&gt; ?data fns (applied left-&gt;right) that
transform the data map dispatched to appender fns. If any 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!`.</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L59">view source</a></div></div><div class="public anchor" id="var-fatal"><h3>fatal</h3><h4 class="type">macro</h4><div class="usage"><code>(fatal &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L617">view source</a></div></div><div class="public anchor" id="var-fatalf"><h3>fatalf</h3><h4 class="type">macro</h4><div class="usage"><code>(fatalf &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L628">view source</a></div></div><div class="public anchor" id="var-get-.3Fhostname"><h3>get-?hostname</h3><div class="usage"><code>(get-?hostname)</code></div><div class="doc"><pre class="plaintext">Returns live local hostname, or nil.
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L733">view source</a></div></div><div class="public anchor" id="var-get-.3Fhostname_"><h3>get-?hostname_</h3><div class="usage"><code>(get-?hostname_)</code></div><div class="doc"><pre class="plaintext">Returns a new `(get-?hostname)` promise.
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L737">view source</a></div></div><div class="public anchor" id="var-get-env"><h3>get-env</h3><h4 class="type">macro</h4><div class="usage"><code>(get-env)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L695">view source</a></div></div><div class="public anchor" id="var-get-hostname"><h3>get-hostname</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Returns cached hostname string.
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L745">view source</a></div></div><div class="public anchor" id="var-handle-uncaught-jvm-exceptions.21"><h3>handle-uncaught-jvm-exceptions!</h3><div class="usage"><code>(handle-uncaught-jvm-exceptions! &amp; [handler])</code></div><div class="doc"><pre class="plaintext">Sets JVM-global DefaultUncaughtExceptionHandler.
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L658">view source</a></div></div><div class="public anchor" id="var-info"><h3>info</h3><h4 class="type">macro</h4><div class="usage"><code>(info &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L614">view source</a></div></div><div class="public anchor" id="var-infof"><h3>infof</h3><h4 class="type">macro</h4><div class="usage"><code>(infof &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L625">view source</a></div></div><div class="public anchor" id="var-level.3E.3D"><h3>level&gt;=</h3><div class="usage"><code>(level&gt;= x y)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L166">view source</a></div></div><div class="public anchor" id="var-log"><h3>log</h3><h4 class="type">macro</h4><div class="usage"><code>(log level &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L611">view source</a></div></div><div class="public anchor" id="var-log.21"><h3>log!</h3><h4 class="type">macro</h4><div class="usage"><code>(log! level msg-type args &amp; [opts])</code></div><div class="doc"><pre class="plaintext">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`.</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L545">view source</a></div></div><div class="public anchor" id="var-log*"><h3>log*</h3><h4 class="type">macro</h4><div class="usage"><code>(log* config level &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L610">view source</a></div></div><div class="public anchor" id="var-log-and-rethrow-errors"><h3>log-and-rethrow-errors</h3><h4 class="type">macro</h4><div class="usage"><code>(log-and-rethrow-errors &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L654">view source</a></div></div><div class="public anchor" id="var-log-env"><h3>log-env</h3><h4 class="type">macro</h4><div class="usage"><code>(log-env)</code><code>(log-env level)</code><code>(log-env level name)</code><code>(log-env config level name)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L791">view source</a></div></div><div class="public anchor" id="var-log-errors"><h3>log-errors</h3><h4 class="type">macro</h4><div class="usage"><code>(log-errors &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L653">view source</a></div></div><div class="public anchor" id="var-log.3F"><h3>log?</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L785">view source</a></div></div><div class="public anchor" id="var-logf"><h3>logf</h3><h4 class="type">macro</h4><div class="usage"><code>(logf level &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L622">view source</a></div></div><div class="public anchor" id="var-logf*"><h3>logf*</h3><h4 class="type">macro</h4><div class="usage"><code>(logf* config level &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L621">view source</a></div></div><div class="public anchor" id="var-logged-future"><h3>logged-future</h3><h4 class="type">macro</h4><div class="usage"><code>(logged-future &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L655">view source</a></div></div><div class="public anchor" id="var-logging-enabled.3F"><h3>logging-enabled?</h3><div class="usage"><code>(logging-enabled? level compile-time-ns)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L786">view source</a></div></div><div class="public anchor" id="var-logp"><h3>logp</h3><h4 class="type">macro</h4><div class="usage"><code>(logp &amp; sigs)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L790">view source</a></div></div><div class="public anchor" id="var-may-log.3F"><h3>may-log?</h3><div class="usage"><code>(may-log? level)</code><code>(may-log? level ?ns-str)</code><code>(may-log? level ?ns-str ?config)</code></div><div class="doc"><pre class="plaintext">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</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L284">view source</a></div></div><div class="public anchor" id="var-merge-config.21"><h3>merge-config!</h3><div class="usage"><code>(merge-config! m)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L145">view source</a></div></div><div class="public anchor" id="var-ordered-levels"><h3>ordered-levels</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L784">view source</a></div></div><div class="public anchor" id="var-println-appender"><h3>println-appender</h3><div class="usage"><code>(println-appender &amp; [{:keys [stream], :or {stream :auto}}])</code></div><div class="doc"><pre class="plaintext">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 &lt;io-stream&gt;}.</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L54">view source</a></div></div><div class="public anchor" id="var-refer-timbre"><h3>refer-timbre</h3><div class="usage"><code>(refer-timbre)</code></div><div class="doc"><pre class="plaintext">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)])</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L699">view source</a></div></div><div class="public anchor" id="var-report"><h3>report</h3><h4 class="type">macro</h4><div class="usage"><code>(report &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L618">view source</a></div></div><div class="public anchor" id="var-reportf"><h3>reportf</h3><h4 class="type">macro</h4><div class="usage"><code>(reportf &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L629">view source</a></div></div><div class="public anchor" id="var-set-config.21"><h3>set-config!</h3><div class="usage"><code>(set-config! m)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L144">view source</a></div></div><div class="public anchor" id="var-set-level.21"><h3>set-level!</h3><div class="usage"><code>(set-level! level)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L147">view source</a></div></div><div class="public anchor" id="var-sometimes"><h3>sometimes</h3><h4 class="type">macro</h4><div class="usage"><code>(sometimes probability &amp; body)</code></div><div class="doc"><pre class="plaintext">Handy for sampled logging, etc.
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L776">view source</a></div></div><div class="public anchor" id="var-spit-appender"><h3>spit-appender</h3><div class="usage"><code>(spit-appender &amp; [{:keys [fname], :or {fname "./timbre-spit.log"}}])</code></div><div class="doc"><pre class="plaintext">Returns a simple `spit` file appender for Clojure.
</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L55">view source</a></div></div><div class="public anchor" id="var-spy"><h3>spy</h3><h4 class="type">macro</h4><div class="usage"><code>(spy expr)</code><code>(spy level expr)</code><code>(spy level name expr)</code><code>(spy config level name expr)</code></div><div class="doc"><pre class="plaintext">Evaluates named expression and logs its result. Always returns the result.
Defaults to :debug logging level and unevaluated expression as name.</pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L687">view source</a></div></div><div class="public anchor" id="var-stacktrace"><h3>stacktrace</h3><div class="usage"><code>(stacktrace err)</code><code>(stacktrace err opts)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L756">view source</a></div></div><div class="public anchor" id="var-str-println"><h3>str-println</h3><div class="usage"><code>(str-println &amp; xs)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L787">view source</a></div></div><div class="public anchor" id="var-swap-config.21"><h3>swap-config!</h3><div class="usage"><code>(swap-config! f &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L140">view source</a></div></div><div class="public anchor" id="var-trace"><h3>trace</h3><h4 class="type">macro</h4><div class="usage"><code>(trace &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L612">view source</a></div></div><div class="public anchor" id="var-tracef"><h3>tracef</h3><h4 class="type">macro</h4><div class="usage"><code>(tracef &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L623">view source</a></div></div><div class="public anchor" id="var-valid-level"><h3>valid-level</h3><div class="usage"><code>(valid-level x)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L162">view source</a></div></div><div class="public anchor" id="var-valid-level.3F"><h3>valid-level?</h3><div class="usage"><code>(valid-level? x)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L161">view source</a></div></div><div class="public anchor" id="var-warn"><h3>warn</h3><h4 class="type">macro</h4><div class="usage"><code>(warn &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L615">view source</a></div></div><div class="public anchor" id="var-warnf"><h3>warnf</h3><h4 class="type">macro</h4><div class="usage"><code>(warnf &amp; args)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L626">view source</a></div></div><div class="public anchor" id="var-with-config"><h3>with-config</h3><h4 class="type">macro</h4><div class="usage"><code>(with-config config &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L136">view source</a></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context context &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L342">view source</a></div></div><div class="public anchor" id="var-with-default-outs"><h3>with-default-outs</h3><h4 class="type">macro</h4><div class="usage"><code>(with-default-outs &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L728">view source</a></div></div><div class="public anchor" id="var-with-level"><h3>with-level</h3><h4 class="type">macro</h4><div class="usage"><code>(with-level level &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L148">view source</a></div></div><div class="public anchor" id="var-with-log-level"><h3>with-log-level</h3><h4 class="type">macro</h4><div class="usage"><code>(with-log-level level &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L788">view source</a></div></div><div class="public anchor" id="var-with-logging-config"><h3>with-logging-config</h3><h4 class="type">macro</h4><div class="usage"><code>(with-logging-config config &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L789">view source</a></div></div><div class="public anchor" id="var-with-merged-config"><h3>with-merged-config</h3><h4 class="type">macro</h4><div class="usage"><code>(with-merged-config config &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/ptaoussanis/timbre/blob/master/target/classes/taoensso/timbre.clj#L137">view source</a></div></div></div></body></html>