Liking cljdoc? Tell your friends :D

com.kroo.epilogue

Simple Clojure logging facade for logging structured data via SLF4J 2+.

Simple Clojure logging facade for logging structured data via SLF4J 2+.
raw docstring

*context*clj

Logging context. A structured alternative to the MDC that is thread safe and nicer to use from Clojure. (You can still use the MDC if you like.)

Everything in here in scope of the log statement will be included in the log. Try to use fully qualified keywords to avoid naming conflicts with the core log data.


Why an atom AND a dynamic var? The dynamic var allows this value to differentiate between threads and dynamic scope, while the atom provides safe alteration and the ability to set global context values.

Logging context.  A structured alternative to the [MDC][] that is thread safe
and nicer to use from Clojure.  (You can still use the MDC if you like.)

[MDC]: https://logback.qos.ch/manual/mdc.html

Everything in here in scope of the log statement will be included in the log.
Try to use fully qualified keywords to avoid naming conflicts with the core
log data.

---

Why an atom AND a dynamic var?  The dynamic var allows this value to
differentiate between threads and dynamic scope, while the atom provides safe
alteration and the ability to set global context values.
sourceraw docstring

debugcljmacro

(debug msg data & {:keys [cause markers logger-ns]})

Log a message (msg) and data at the :debug logging level.

See com.kroo.epilogue/log for more details.

Log a message (`msg`) and `data` at the `:debug` logging level.

See `com.kroo.epilogue/log` for more details.
sourceraw docstring

defloggingmacrocljmacro

(defloggingmacro name doc-string? attr-map? [params*] body)
(defloggingmacro name doc-string? attr-map? ([params*] body) + attr-map?)

Defines a macro that preserves the original line number and column making it suitable for logging. Otherwise behaves identically to defmacro.

Defines a macro that preserves the original line number and column making it
suitable for logging.  Otherwise behaves identically to `defmacro`.
sourceraw docstring

errorcljmacro

(error msg data & {:keys [cause markers logger-ns]})

Log a message (msg) and data at the :error logging level.

See com.kroo.epilogue/log for more details.

Log a message (`msg`) and `data` at the `:error` logging level.

See `com.kroo.epilogue/log` for more details.
sourceraw docstring

infocljmacro

(info msg data & {:keys [cause markers logger-ns]})

Log a message (msg) and data at the :info logging level.

See com.kroo.epilogue/log for more details.

Log a message (`msg`) and `data` at the `:info` logging level.

See `com.kroo.epilogue/log` for more details.
sourceraw docstring

level?clj

Hashset of accepted levels.

Hashset of accepted levels.
sourceraw docstring

logcljmacro

(log level msg data & {:keys [cause markers logger-ns]})

Logs a message (msg) and data at the specified logging level. The log will also include anything in *context* within the current dynamic scope.

data can be anything that implements the clojure.core.protocols/IKVReduce protocol, but it is recommended to log only maps to avoid confusion.

Options:

  • a throwable object as the cause,
  • a sequence of SLF4J markers (or strings/keywords), and
  • an override logger namespace (logger-ns).
Logs a message (`msg`) and `data` at the specified logging `level`.  The log
will also include anything in `*context*` within the current dynamic scope.

`data` can be anything that implements the `clojure.core.protocols/IKVReduce`
protocol, but it is recommended to log only maps to avoid confusion.

Options:
  - a throwable object as the `cause`,
  - a sequence of SLF4J `markers` (or strings/keywords), and
  - an override logger namespace (`logger-ns`).
sourceraw docstring

log*clj

(log* level msg data cause markers logger-ns src)

Primitive logging function for Epilogue.

Do not use this function directly! Use the provided macros instead. Backwards compatibility is not guaranteed for this function.

Primitive logging function for Epilogue.

Do not use this function directly!  Use the provided macros instead.
Backwards compatibility is not guaranteed for this function.
sourceraw docstring

raisecljmacro

(raise msg data & {:keys [level cause markers logger-ns]})

Log and throw. Logs at :error level by default. Constructs and throws a clojure.lang.ExceptionInfo object.

Log and throw.  Logs at `:error` level by default.  Constructs and throws a
`clojure.lang.ExceptionInfo` object.
sourceraw docstring

tracecljmacro

(trace msg data & {:keys [cause markers logger-ns]})

Log a message (msg) and data at the :trace logging level.

See com.kroo.epilogue/log for more details.

Log a message (`msg`) and `data` at the `:trace` logging level.

See `com.kroo.epilogue/log` for more details.
sourceraw docstring

warncljmacro

(warn msg data & {:keys [cause markers logger-ns]})

Log a message (msg) and data at the :warn logging level.

See com.kroo.epilogue/log for more details.

Log a message (`msg`) and `data` at the `:warn` logging level.

See `com.kroo.epilogue/log` for more details.
sourceraw docstring

with-contextcljmacro

(with-context context & body)

Merge context onto the current logging *context*, creating a new scope around body.

Merge `context` onto the current logging `*context*`, creating a new scope
around `body`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close