Liking cljdoc? Tell your friends :D

logback-riemann-appender Build Status

Changes on this fork

Forked from: https://github.com/walmartlabs/logback-riemann-appender

This fork simplifies the logback events sent to riemann to include little more than the severity (no message, stack traces, etc.) Each time a log event that passes the filter is raised a riemann event called ${serviceName}.LEVEL will be published.

It's used to keep track of the number of errors per service with riemann config like the following:

(where (tagged "log-event")
            (by :service
                (moving-time-window (mins 60)
                                    (smap folds/count index))))

Logback appender for Riemann

  • Sends logging level events to Riemann via UDP or TCP
  • Supports configurable level-based filtering of log events via the riemannLogLevel config property
  • Maps attributes of the log event to a Riemann event as follows:
Log EventRiemann Event
leveladded as a custom attribute: :log/level

:host and :service base are set via configuring logback.xml as below. You can also configure customAttributes for the logger -- these will be added to the Riemann event as custom attributes. Each of the keys of the custom attributes will be in the log namespace.

Usage

Artifacts are available through clojars which you can add to your maven repository like so:

<repository>
  <id>clojars.org</id>
  <url>http://clojars.org/repo</url>
</repository>

See resources/logback.xml for a full example configuration.

<configuration scan="true">
 <appender name="riemannAppender" class="com.walmartlabs.logback.RiemannAppender">
   <serviceName>myservice.logs</serviceName>
   <riemannHostname>127.0.0.1</riemannHostname>
   <riemannPort>5555</riemannPort>
   <riemannLogLevel>WARN</riemannLogLevel>
   <tcp>true</tcp>
 </appender>
  </appender>
  <root level="DEBUG">
    <appender-ref ref="R1"/>
  </root>
</configuration>

License

Copyright © 2013 Kyle Burton

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close