(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.
(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.
(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.
(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.(debug & args)Write a debug message to the log.
Write a debug message to the log.
(error & args)Write an error message to the log.
Write an error message to the log.
(fatal & args)Write a fatal message to the log.
Write a fatal message to the log.
(get-appender appender-name)Retrieve an appender by name from the current configuration.
Retrieve an appender by name from the current configuration.
(info & args)Write an info message to the log.
Write an info message to the log.
(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.
(log level & args)Write a message to the log.
Write a message to the log.
(trace & args)Write a trace message to the log.
Write a trace message to the log.
(warn & args)Write a warning message to the log.
Write a warning message to the log.
(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.
(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.
(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.
(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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |