storecove / rollbar-scala

Notifier library for integrating Scala apps with the Rollbar service.

Version Matrix


Travis master branch Gitter GitHub release GitHub issues GitHub license

Notifier library for integrating Scala apps with the Rollbar service.


You can find both scala 2.10 & 2.11 versions on the Central Repository.

We are distributing a non-fat JAR, so you will need to include in your project also this library dependencies (which are few and lightweight!).

For SBT:

libraryDependencies ++= Seq(
    "com.storecove" %% "rollbar-scala" % "1.0",
    "net.databinder.dispatch" %% "dispatch-core" % "0.11.2",
    "org.json4s" %% "json4s-jackson" % "3.2.11",
    "org.slf4j" % "slf4j-api" % "1.7.12"

In addition to these, you will need also an SLF4J logger implementation.

This library ships with concrete Rollbar appenders for both Log4j and Logback, so (if you haven't already done it) add one of them to your dependencies.


You can implement your own appender or use the notifier as it is by getting a RollbarNotifier from a RollbarNotifierFactory. Then you can use the notify() method to send a payload to the Rollbar service.

Or else you can use one of the default appenders (configuration examples follows).


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false" xmlns:log4j=""
                     xsi:schemaLocation=" ">

    <appender name="console" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %C:%L - %m%n" />

    <appender name="ROLLBAR" class="com.storecove.rollbar.appenders.Log4jAppender">
        <param name="enabled" value="true"/>
        <param name="apiKey" value="${ROLLBAR_API_KEY}"/>
        <param name="environment" value="${ROLLBAR_ENV}"/>
        <param name="onlyThrowable" value="false" />
        <param name="notifyLevel" value="INFO" />
        <param name="limit" value="1000" />
        <param name="url" value="" />
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %C:%L - %m%n" />

        <level value="${LOG_LEVEL}"/>
        <appender-ref ref="console"/>
        <appender-ref ref="ROLLBAR"/>


<configuration debug="true">
    <property file="${storecove_logging_file}" />

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}:%L - %msg%n</pattern>

    <appender name="ROLLBAR" class="com.storecove.rollbar.appenders.LogbackAppender">

    <root level="${LOG_LEVEL}">
        <appender-ref ref="STDOUT" />
        <appender-ref ref="ROLLBAR"/>