Access log formatters and async processing. Supports JSON and CLF (Common Log Format) output.
Access log formatters and async processing. Supports JSON and CLF (Common Log Format) output.
(create-async-logger format-type
output-fns
&
{:keys [buffer-size] :or {buffer-size 10000}})Create an async logger that formats and writes log entries.
output-fns: Vector of functions that accept a formatted log line string. Each function is called for every log entry.
Returns an AsyncLogger record.
Create an async logger that formats and writes log entries.
output-fns: Vector of functions that accept a formatted log line string.
Each function is called for every log entry.
Returns an AsyncLogger record.(format-clf entry)Format an AccessLogEntry in Common Log Format style. Format: src_ip - - [timestamp] "event dst_ip:dst_port -> backend_ip:backend_port" bytes_fwd/bytes_rev duration_ms
Format an AccessLogEntry in Common Log Format style. Format: src_ip - - [timestamp] "event dst_ip:dst_port -> backend_ip:backend_port" bytes_fwd/bytes_rev duration_ms
(format-entry format-type entry)Format an AccessLogEntry using the specified format.
Format an AccessLogEntry using the specified format.
(format-json entry)Format an AccessLogEntry as JSON.
Format an AccessLogEntry as JSON.
(log-entry! logger entry)Submit an entry to the async logger for processing. Non-blocking, returns immediately.
Submit an entry to the async logger for processing. Non-blocking, returns immediately.
(logger-running? logger)Check if the logger is running.
Check if the logger is running.
(stats-event->log-entry event conntrack-map)Convert a StatsEvent to an AccessLogEntry.
Convert a StatsEvent to an AccessLogEntry.
(stop-logger! logger)Stop the async logger and close its channel.
Stop the async logger and close its channel.
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 |