Liking cljdoc? Tell your friends :D

lupapiste-commons.gcp-json-logging


combine-args-mwclj

(combine-args-mw {:keys [vargs msg-type] :as data})

Middleware for formatting log arguments as strings

The timbre-json-appender library eagerly considers logging arguments to be data. Logging calls like (timbre/warn :foo 42) would result in a) no message and b) {:args {:foo 42}}

See https://github.com/viesti/timbre-json-appender?tab=readme-ov-file#format-of-the-log-invocation

To work around this, we can use this middleware to produce the leading message string (and also include the arguments in a map).

Middleware for formatting log arguments as strings

The `timbre-json-appender` library eagerly considers logging
arguments to be data. Logging calls like `(timbre/warn :foo 42)`
would result in a) no message and b) {:args {:foo 42}}

See https://github.com/viesti/timbre-json-appender?tab=readme-ov-file#format-of-the-log-invocation

To work around this, we can use this middleware to produce the
leading message string (and also include the arguments in a map). 
sourceraw docstring

string-stack-trace-mwclj

(string-stack-trace-mw {:keys [?err] :as data})

Adds a stack_trace field when logging errors for GCP.

The timbre-json-appender already creates a nested map from the error with Throwable->map, but it seems error reporting in GCP does not recognize that format.

Adds a `stack_trace` field when logging errors for GCP.

The `timbre-json-appender` already creates a nested map from the
error with `Throwable->map`, but it seems error reporting in GCP
does not recognize that format.
sourceraw docstring

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

× close