Liking cljdoc? Tell your friends :D

ch.codesmith.logger


aggregate-markersclj

(aggregate-markers args)
source

assocclj

(assoc {:keys [m]} k v)
(assoc {:keys [m]} k v & kvs)

Assoc the given key/values a prerendered context.

Assoc the given key/values a prerendered context.
sourceraw docstring

boxcljmacro

(box arg)

Ensures at compile time that the argument is an Object. This macro is necessary to avoid reflection warning from numeric constants that are emitted unboxed by the compiler.

Ensures at compile time that the argument is an Object.
This macro is necessary to avoid reflection warning from numeric constants that are emitted unboxed by the compiler.
sourceraw docstring

coerce-stringcljmacro

(coerce-string arg)

Coerce, at compile time, the argument to be a String.

Coerce, at compile time, the argument to be a String.
sourceraw docstring

compile-to-arraycljmacro

(compile-to-array & args)

Compile code to create a java array with the given arguments

Compile code to create a java array with the given arguments
sourceraw docstring

compile-to-struct-argscljmacro

(compile-to-struct-args & args)

Compile code to create a java array with the given arguments

Compile code to create a java array with the given arguments
sourceraw docstring

Contextclj

source

context-logging-keyclj

The key under which the log-c, log-m and log-e macros put the context in the logstash JSON. By default, it is "context".

The key under which the [[log-c]], [[log-m]] and [[log-e]] macros put the context in the logstash JSON.
By default, it is "context".
sourceraw docstring

context-pre-logging-transformationclj

A transformation function that is applied to the context before logging. By default, it is the identity (no transformation).

A transformation function that is applied to the context before logging.
By default, it is the identity (no transformation).
sourceraw docstring

ctxclj

(ctx m)

Wraps the supplied map in a record containing a prerendered Marker; this allows to use a relatively static context without rerendering it as json on every log entry.

Wraps the supplied map in a record containing a prerendered Marker; this allows to use a
relatively static context without rerendering it as json on every log entry.
sourceraw docstring

debug-ccljmacro

(debug-c ctx)
(debug-c ctx msg)
(debug-c ctx msg & struct-args)

Uses log-c on debug level.

Uses `log-c` on debug level.
sourceraw docstring

debug-ecljmacro

(debug-e e)
(debug-e e ctx)
(debug-e e ctx msg)

Uses log-e on debug level.

Uses `log-e` on debug level.
sourceraw docstring

debug-mcljmacro

(debug-m msg & args)

Uses log-m on debug level.

Uses `log-m` on debug level.
sourceraw docstring

debug-scljmacro

(debug-s msg & struct-args)

Uses log-s on trace debug.

Uses `log-s` on trace debug.
sourceraw docstring

default-context-logging-keyclj

source

default-context-pre-logging-transformationclj

source

default-ex-data-logging-keyclj

source

default-version-file-pathclj

source

defloggercljmacro

(deflogger)

Creates a var named ⠇⠕⠶⠻ in the current namespace *ns* to contain a [[org.slf4j.Logger]] The name is "logger" written in braille-2 notation.

Creates a var named `⠇⠕⠶⠻` in the current namespace `*ns*` to contain a [[org.slf4j.Logger]]
The name is "logger" written in braille-2 notation.
sourceraw docstring

ensure-throwableclj

(ensure-throwable e)

Ensures, at runtime, that the argument is a throwable. If the argument is not throwable, its string representation is embedded in an ex-info.

Ensures, at runtime, that the argument is a throwable.
If the argument is not throwable, its string representation is embedded in an `ex-info`.
sourceraw docstring

error-ccljmacro

(error-c ctx)
(error-c ctx msg)
(error-c ctx msg & args)

Uses log-c on error level.

Uses `log-c` on error level.
sourceraw docstring

error-ecljmacro

(error-e e)
(error-e e ctx)
(error-e e ctx msg)

Uses log-e on error level.

Uses `log-e` on error level.
sourceraw docstring

error-mcljmacro

(error-m msg & args)

Uses log-m on error level.

Uses `log-m` on error level.
sourceraw docstring

error-scljmacro

(error-s msg & struct-args)

Uses log-s on trace error.

Uses `log-s` on trace error.
sourceraw docstring

ex-data-logging-keyclj

The key under with the log-e macros put the ex-data from an exception in the logstash JSON. By default, it is "exdata".

The key under with the [[log-e]] macros put the `ex-data` from an exception in the logstash JSON.
By default, it is "exdata".
sourceraw docstring

fullnameclj

(fullname k)
source

info-ccljmacro

(info-c ctx)
(info-c ctx msg)
(info-c ctx msg & args)

Uses log-c on info level.

Uses `log-c` on info level.
sourceraw docstring

info-ecljmacro

(info-e e)
(info-e e ctx)
(info-e e ctx msg)

Uses log-e on info level.

Uses `log-e` on info level.
sourceraw docstring

info-mcljmacro

(info-m msg & args)

Uses log-m on info level.

Uses `log-m` on info level.
sourceraw docstring

info-scljmacro

(info-s msg & struct-args)

Uses log-s on trace info.

Uses `log-s` on trace info.
sourceraw docstring

kvclj

(kv k v)
source

level-predclj

(level-pred method)

For the given method symbol, compute the corresponding isXXXEnabled method symbol.

For the given `method` symbol, compute the corresponding `isXXXEnabled` method symbol.
sourceraw docstring

log-ccljmacro

(log-c method ctx)
(log-c method ctx msg)
(log-c method ctx msg & struct-args)

Logging macro to output the context map ctx in the JSON string generated by the logstash encoder. Variants allow to pass a message as slf4j format string with 2*n structured arguments. The argument method is the symbol of the log method to call on the [[Logger]] object. Typically, the level macros (trace-c, debug-c, etc.) are used instead of this macro. The macro generates code that verifies that the corresponding log level is enabled.

Logging macro to output the context map `ctx` in the JSON string generated by the logstash encoder.
Variants allow to pass a message as slf4j format string with 2*n structured arguments.
The argument `method` is the symbol of the log method to call on the [[Logger]] object. Typically,
the level macros (`trace-c`, `debug-c`, etc.) are used instead of this macro.
The macro generates code that verifies that the corresponding log level is enabled.
sourceraw docstring

log-ecljmacro

(log-e method e)
(log-e method e ctx)
(log-e method e ctx msg)

Logging macro for logging a [[Throwable]] using the dedicated logging methods for errors. Variants allow to pass a context ctx and an explicit message msg. If no msg is provided, the message of the [[Throwable]] is use instead. If ex-data of the exception is defined, it is included as a Marker under the key ex-data-logging-key. The argument method is the symbol of the log method to call on the [[Logger]] object. Typically, the level macros (trace-e, debug-e, etc.) are used instead of this macro. The macro generates code that verifies that the corresponding log level is enabled.

Logging macro for logging a [[Throwable]] using the dedicated logging methods for errors.
Variants allow to pass a context `ctx` and an explicit message `msg`. If no `msg` is
provided, the message of the [[Throwable]] is use instead. If `ex-data` of the exception is defined,
it is included as a Marker under the key [[ex-data-logging-key]].
The argument `method` is the symbol of the log method to call on the [[Logger]] object. Typically,
the level macros (`trace-e`, `debug-e`, etc.) are used instead of this macro.
The macro generates code that verifies that the corresponding log level is enabled.
sourceraw docstring

log-mcljmacro

(log-m method msg & args)

Logging macro for a simple logging message msg. Variants allow to pass a message as slf4j format string with n arguments. The argument method is the symbol of the log method to call on the [[Logger]] object. Typically, the level macros (trace-m, debug-m, etc.) are used instead of this macro.

Logging macro for a simple logging message `msg`.
Variants allow to pass a message as slf4j format string with n arguments.
The argument `method` is the symbol of the log method to call on the [[Logger]] object. Typically,
the level macros (`trace-m`, `debug-m`, etc.) are used instead of this macro.
sourceraw docstring

log-scljmacro

(log-s method msg & struct-args)

Logging macro for a logging message msg with structured arguments Variants allow to pass a message as slf4j format string with 2*n structured arguments. The argument method is the symbol of the log method to call on the [[Logger]] object. Typically, the level macros (trace-s, `debug-s, etc.) are used instead of this macro. The macro generates code that verifies that the corresponding log level is enabled.

Logging macro for a logging message `msg` with structured arguments
Variants allow to pass a message as slf4j format string with 2*n structured arguments.
The argument `method` is the symbol of the log method to call on the [[Logger]] object. Typically,
the level macros (`trace-s`, `debug-s, etc.) are used instead of this macro.
The macro generates code that verifies that the corresponding log level is enabled.
sourceraw docstring

raw-jsonclj

(raw-json value)
source

set-context-logging-key!clj

(set-context-logging-key! logging-key)

Configuration function to set the context-logging-key.

Configuration function to set the [[context-logging-key]].
sourceraw docstring

set-context-pre-logging-transformation!clj

(set-context-pre-logging-transformation! tranformation)

Configuration function to set the context-pre-logging-transformation

Configuration function to set the [[context-pre-logging-transformation]]
sourceraw docstring

set-ex-data-logging-key!clj

(set-ex-data-logging-key! logging-key)

Configuration function to set the ex-data-logging-key.

Configuration function to set the [[ex-data-logging-key]].
sourceraw docstring

set-version-file-path!clj

(set-version-file-path! path)

Configuration function to set the version-file-path

Configuration function to set the [[version-file-path]]
sourceraw docstring

spycljmacro

(spy expr)
(spy level expr)

A spy macro to log inspection of an expression. It will log the value of the expression and the expression itself as context via log-c with "spy" as message. By default, it uses the debug level; the diadic version allows to specify the level as string, keyword or symbol (e.g. `(spy :info (+ 1 2)) for info level.

A spy macro to log inspection of an expression.
It will log the value of the expression and the expression itself as context via `log-c`
with "spy" as message.
By default, it uses the debug level; the diadic version allows to specify the level as string,
keyword or symbol (e.g. `(spy :info (+ 1 2)) for info level.
sourceraw docstring

throw-logger-missing-exceptionclj

(throw-logger-missing-exception)

Throw an [[IllegalStateException]] to signal that the deflogger macro has not been called properly.

Throw an [[IllegalStateException]] to signal that the `deflogger` macro has not been called properly.
sourceraw docstring

ToContextMarkercljprotocol

ctx-markerclj

(ctx-marker self)

markerclj

(marker self logging-key)
source

trace-ccljmacro

(trace-c ctx)
(trace-c ctx msg)
(trace-c ctx msg & struct-args)

Uses loc-c on trace level.

Uses `loc-c` on trace level.
sourceraw docstring

trace-ecljmacro

(trace-e e)
(trace-e e ctx)
(trace-e e ctx msg)

Uses log-e on trace level.

Uses `log-e` on trace level.
sourceraw docstring

trace-mcljmacro

(trace-m msg & args)

Uses loc-m on trace level.

Uses `loc-m` on trace level.
sourceraw docstring

trace-scljmacro

(trace-s msg & struct-args)

Uses log-s on trace level.

Uses `log-s` on trace level.
sourceraw docstring

versioncljmacro

(version)
(version ns)
source

version-file-pathclj

A path (as string) where a edn file with the version of the program is located. The edn file must be a map with the key :version. By default, it is the location where the anvil library creates a version edn file when building docker artifacts.

A path (as string) where a edn file with the version of the program is located.
The edn file must be a map with the key `:version`.
By default, it is the location where the [anvil](https://github.com/codesmith-gmbh/anvil)
library creates a version edn file when building docker artifacts.
sourceraw docstring

version-from-fileclj

(version-from-file)
(version-from-file version-file)
source

version-from-ns-as-classcljmacro

(version-from-ns-as-class)
(version-from-ns-as-class ns)
source

warn-ccljmacro

(warn-c ctx)
(warn-c ctx msg)
(warn-c ctx msg & args)

Uses log-c on warn level.

Uses `log-c` on warn level.
sourceraw docstring

warn-ecljmacro

(warn-e e)
(warn-e e ctx)
(warn-e e ctx msg)

Uses log-e on warn level.

Uses `log-e` on warn level.
sourceraw docstring

warn-mcljmacro

(warn-m msg & args)

Uses log-m on warn level.

Uses `log-m` on warn level.
sourceraw docstring

warn-scljmacro

(warn-s msg & struct-args)

Uses log-s on trace warn.

Uses `log-s` on trace warn.
sourceraw docstring

⠇⠕⠶⠻clj

source

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

× close