https://cljdoc.org/badge/net.clojars.rrudakov/timbre-syslog-remote
Third-party timbre syslog appender with remote host support.
The main purpose of this library is to provide a direct integration of timbre and Papertrail.
The format of messages is compliant with RFC 3164.
The library is tested with papertrail and I don't expect any breaking changes. It's not tested with localhost, but it should work if syslog is configured properly (it should listen to the port 514).
net.clojars.rrudakov/timbre-syslog-remote {:mvn/version "0.2.8"}
[net.clojars.rrudakov/timbre-syslog-remote "0.2.8"]
(require '[io.rrudakov.timbre.syslog :refer [syslog-appender]])
(binding [timbre/*config*
(assoc-in timbre/*config* [:appenders :syslog]
(syslog-appender {:host "logs2.papertrailapp.com"
:port 99999
:no-stacktrace? true
:ident "application.name"}))]
(timbre/infof "This is my info %d" (rand-int 999)))
All configuration parameters are optional.
:host
: remote host to connect (default:localhost
):port
: UDP port (default:514
):ident
: application name (default:nil
):no-stacktrace?
: iffalse
stacktraces will be logged (default:false
)
Syslog doesn't support multiline log messages by default, but sometimes it's useful to print exceptions with stacktraces. If option :no-stacktrace?
is false
, stacktrace will be sent line by line: