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
Configure your pom.xml:
<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>com.sndyuk</groupId>
<artifactId>logback-more-appenders</artifactId>
<version>1.2.0</version>
</dependency>
<!-- [Optional] If you use The Fluentd appender, You need to add the dependency(fluent-logger). -->
<dependency>
<groupId>org.fluentd</groupId>
<artifactId>fluent-logger</artifactId>
<version>${fluentd.logger.version}</version>
</dependency>
<!-- [Optional] If you use The Amazon DynamoDB appender, You need to add the dependency(aws-java-sdk). -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>${aws.version}</version>
</dependency>
</dependencies>
You can find configuration files example here:
Before you use The Amazon DynamoDB appender, you need to create the table on DynamoDB:
AWS Console -> DynamoDB -> Choose region -> Create Table ->
Table Name: [Table name described in logback.xml]
Partition key: "instance" as String / (Hash Attribute)
Add sort key: "id" as Number / (Range Attribute)