taoensso.timbre.appenders.core

Core Timbre appenders without any special dependency requirements.
These can be aliased into the main Timbre ns for convenience.

console-appender

cljs

(console-appender & [{:keys [raw-console?]}])
Returns a simple js/console appender for ClojureScript.

Raw logging

  There's 2 ways that Timbre can log to a web browser console:
    1. As a prepared output string (default)
    2. As a list of raw argument objects

  The benefit of #2 is that it allows the browser to offer type-specific
  object printing and inspection (e.g. for maps, etc.).

  Raw logging can be enabled or disabled as follows:

    1. On a per-call basis via a special 1st argument to your logging call:
         (info ^:meta {:raw-console? true} arg1 ...)

    2. Via middleware, by adding an option to your log data:
         (fn my-middleware [data] (assoc data :raw-console? true))

    3. Via an option provided to this appender constructor:
         (console-appender {:raw-console? <bool>})

Ignoring library / "blackbox" code for accurate line numbers, etc.

  Most web browsers offer a feature to ignore library or "blackbox" code
  in their debugger.

  You'll probably want to ignore at least the following:
    `/taoensso/timbre/appenders/core\.js$` ; Timbre console appender
    `/taoensso/timbre\.js$`                ; Timbre core
    `/cljs/core\.js$`                      ; ClojureScript core

  Depending on the browser, you can usually set up these exclusions through
  right-click popups and/or through a configurable list in a settings menu.

  For example:
    https://developer.chrome.com/docs/devtools/settings/ignore-list/
    https://webkit.org/web-inspector/web-inspector-settings/
    https://firefox-source-docs.mozilla.org/devtools-user/debugger/how_to/ignoring_sources/index.html
    etc.

println-appender

clj

cljs

(println-appender & [_opts])
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>}.