Skip to main content

log-capture!

function

clojure.tools.logging/log-capture!

(log-capture! [logger-ns] [logger-ns out-level err-level])
Captures System.out and System.err, piping all writes of those streams to the log. If unspecified, levels default to :info and :error, respectively. The specified logger-ns value will be used to namespace all log entries. Note: use with-logs to redirect output of *out* or *err*. Warning: if the logging implementation is configured to output to System.out (as is the default with java.util.logging) then using this function will result in StackOverflowException when writing to the log.

No examples yet. Be the first to add one!

Categories