is appenders for Logback. You can logging to DynamoDB, Fluentd and more with the logback appender.
-
- depend on fluent-logger for Java.
- Install fluentd before running logger.
-
- depend on aws-java-sdk.
- Create Amazon DynamoDB Table
###Install jars from Maven2 repository Configure your pom.xml:
<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<!-- If you use fluentd appender -->
<dependency>
<groupId>org.fluentd</groupId>
<artifactId>fluent-logger</artifactId>
<version>${fluentd.logger.version}</version>
</dependency>
<!-- If you use Amazon DynamoDB appender -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>${aws.version}</version>
</dependency>
<dependency>
<groupId>com.sndyuk</groupId>
<artifactId>logback-more-appenders</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>com.sndyuk</id>
<name>Logback more appenders</name>
<url>http://sndyuk.github.com/maven</url>
</repository>
</repositories>
You can find configuration files here:
If you use Amazon DynamoDB appender, You have to create table on DynamoDB:
AWS Console -> DynamoDB -> Choose region -> Create Table ->
Table Name: [Table name described logback.xml]
Primary Key: Hash and Range
Hash Attribute Name: String - "instance"
Range Attribute Name: Number - "id"