Skip to content
Logback DaDaPush Notification Appender
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
pom.xml

README.md

Logback DaDaPush Notification Appender

Usage

add dependency

<dependency>
  <groupId>com.dadapush.client</groupId>
  <artifactId>dadapush-logback-appender</artifactId>
  <version>1.0.1</version>
</dependency>

define appender

  <appender name="DADAPUSH" class="com.dadapush.client.logback.DaDaPushAppender">

    <!-- basePath default value: https://www.dadapush.com -->
     <basePath>https://www.dadapush.com</basePath> 
    <channelToken>YOUR_CHANNEL_TOKEN</channelToken>

    <titleLayout class="ch.qos.logback.classic.PatternLayout">
      <pattern>[%-5level] %class</pattern>
    </titleLayout>
    <contentLayout class="ch.qos.logback.classic.PatternLayout">
      <pattern>Level: %-5level\nLoggerName: %class\nMessage: %msg%n</pattern>
    </contentLayout>
  </appender>

  <appender name="DADAPUSH_ASYNC" class="ch.qos.logback.classic.AsyncAppender">
    <appender-ref ref="DADAPUSH" />
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>ERROR</level>
    </filter>
  </appender>

use appender

  <root level="info">
    <appender-ref ref="DADAPUSH_ASYNC" />
  </root>
You can’t perform that action at this time.