Liking cljdoc? Tell your friends :D

org.corfield.logging4j2


add-event-appenderclj

(add-event-appender appender-name handler)
(add-event-appender appender-name handler pattern)

Given an appender name, a function that will accept two arguments, and an optional layout pattern, create a log4j2 Appender, start it up, and register it with the logging system.

The function will be called with the Appender and an immutable LogEvent.

The layout pattern %m%n will be used if none is provided, producing a plain message with a trailing newline, suitable for writing to a file.

Returns a no-arg function that can be called to stop/deactivate the appender.

Given an appender name, a function that will accept two arguments, and an 
optional layout pattern, create a log4j2 `Appender`, start it up, and 
register it with the logging system.

The function will be called with the `Appender` and an immutable `LogEvent`.

The layout pattern %m%n will be used if none is provided, producing a plain
message with a trailing newline, suitable for writing to a file.

Returns a no-arg function that can be called to stop/deactivate the appender.
sourceraw docstring

add-message-appenderclj

(add-message-appender appender-name handler)
(add-message-appender appender-name handler pattern)

Given an appender name, a function that will accept a String, and an optional layout pattern, create a log4j2 Appender, start it up, and register it with the logging system.

The string passed to the handler function will be the formatted message from the LogEvent, using the layout pattern from the appender.

If no layout pattern is provided, the default pattern %m will be used, so there will be no trailing newline.

Returns a no-arg function that can be called to stop/deactivate the appender.

Given an appender name, a function that will accept a `String`, and an
optional layout pattern, create a log4j2 `Appender`, start it up, and 
register it with the logging system.

The string passed to the handler function will be the formatted message from 
the `LogEvent`, using the layout pattern from the appender.

If no layout pattern is provided, the default pattern %m will be used, so
there will be no trailing newline.

Returns a no-arg function that can be called to stop/deactivate the appender.
sourceraw docstring

as-markerclj

(as-marker s & parents)

Given a string or keyword, return a Marker object. If multiple strings or keywords are given, use the first one as the name of the marker and the rest as the names of parents.

Given a string or keyword, return a Marker object.
If multiple strings or keywords are given, use the first one as the name
of the marker and the rest as the names of parents.
sourceraw docstring

as-messageclj

(as-message message & args)

Given one or more arguments, return a Message object.

If message is a string and contains '{}', return a ParameterizedMessage with any remaining arguments as parameters.

If message is a map, return a MapMessage.

Otherwise, return a SimpleMessage with all arguments stringified.

Given one or more arguments, return a Message object.

If message is a string and contains '{}', return a ParameterizedMessage
with any remaining arguments as parameters.

If message is a map, return a MapMessage.

Otherwise, return a SimpleMessage with all arguments stringified.
sourceraw docstring

debugcljmacro

(debug & args)

Write a debug message to the log.

Write a debug message to the log.
sourceraw docstring

errorcljmacro

(error & args)

Write an error message to the log.

Write an error message to the log.
sourceraw docstring

fatalcljmacro

(fatal & args)

Write a fatal message to the log.

Write a fatal message to the log.
sourceraw docstring

get-appenderclj

(get-appender appender-name)

Retrieve an appender by name from the current configuration.

Retrieve an appender by name from the current configuration.
sourceraw docstring

infocljmacro

(info & args)

Write an info message to the log.

Write an info message to the log.
sourceraw docstring

layout-formattedclj

(layout-formatted appender event)

Given an Appender and a LogEvent, return the fully formatted message, using the layout from the appender.

Given an `Appender` and a `LogEvent`, return the fully formatted message, 
using the layout from the appender.
sourceraw docstring

logcljmacro

(log level & args)

Write a message to the log.

Write a message to the log.
sourceraw docstring

tracecljmacro

(trace & args)

Write a trace message to the log.

Write a trace message to the log.
sourceraw docstring

warncljmacro

(warn & args)

Write a warning message to the log.

Write a warning message to the log.
sourceraw docstring

with-log-contextcljmacro

(with-log-context ctx & body)

Given a hash map and a code body, add the hash map to the log4j2 mapped diagnostic context, and execute the body.

The logging context is accumulated dynamically.

Given a hash map and a code body, add the hash map to the log4j2 mapped
diagnostic context, and execute the body.

The logging context is accumulated dynamically.
sourceraw docstring

with-log-inheritedcljmacro

(with-log-inherited & body)

Given a code body, inherit the MDC dynamically (from the parent thread), and execute the body.

Given a code body, inherit the MDC dynamically (from the parent thread),
and execute the body.
sourceraw docstring

with-log-tagcljmacro

(with-log-tag tag & body)

Given a keyword or string and a code body, push the tag onto the log4j2 stack context, and execute the body.

Given a keyword or string and a code body, push the tag onto the log4j2
stack context, and execute the body.
sourceraw docstring

with-log-uuidcljmacro

(with-log-uuid & body)

Given a code body, push a unique tag onto the log4j2 stack context, and execute the body.

Given a code body, push a unique tag onto the log4j2 stack context, and
execute the body.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close