is additional appenders for Logback and provide better performance and data consistency without any concern.
-
- depends on cloudwatchlogs(v2) or aws-java-sdk-logs(v1).
-
- depends on kinesis(v2) or aws-java-sdk-kinesis(v1).
-
- depends on fluent-logger for Java.
- Install fluentd before running logger.
-
- depends on fluency.
- Install fluentd before running logger.
This version is a patch for applications implemented with Java9 module(Jigsaw) but using Slf4j version 1.7(which is not a java 9 module), for example Spring boot doesn't allow to use Slf4j 1.8.x(org.slf4j module).
Just add it to your dependency then you can use the slf4j module in your application.
implementation 'com.sndyuk:logback-more-appenders:1.8.6-JAVA9MODULE_SLF4J17'
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.8.7-JAVA9MODULE_SLF4J17</version>
</dependency>
requires org.slf4j;
- Fix CloudWatch appenders duplicate logs: #71
- Add
ignoredField
option: #65
- Add AWS V2 CloudWatch and Kinesis appenders: #64
- Add option for Fluency appender:
jvmHeapBufferMode
- Avoid CloudWatch request limit error
- Fix issue: #60
- Make marker prefix customizable by
markerPrefix
option. #51 - Fix issue: Error creating cloud watch appender with version 1.8.2-JAVA9MODULE_SLF4J17 and 1.8.1-JAVA9MODULE_SLF4J17. #60
- Fix issue at FastJsonEncoder.
- Add options for Fluent / Fluency appenders:
- "encoder" option becomes optional. If you don't set encoder, the log message outputs pure message.
- "messageFieldKeyName" option has been added: Set it if you want to change the default message field key name(= "message").
- Add options for Fluency appender:
bufferChunkRetentionTimeMillis
- Fix bug: Messages were lost sometimes when the messages had been waiting for flushing on shutting down an application.
- Fix bug: Fluent appender: Do not raise an error when a fluentd server is down.
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.8.7</version>
</dependency>
<!-- [Optional] If you use The CloudWatch V2 appender, You need to add the dependency(cloudwatchlogs). -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>cloudwatchlogs</artifactId>
<version>${aws-v2.version}</version>
</dependency>
<!-- [Optional] If you use The CloudWatch appender, You need to add the dependency(aws-java-sdk-logs). -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-logs</artifactId>
<version>${aws.version}</version>
</dependency>
<!-- [Optional] If you use The Kinesis V2 appender, You need to add the dependency(kinesis). -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>kinesis</artifactId>
<version>${aws-v2.version}</version>
<optional>true</optional>
</dependency>
<!-- [Optional] If you use The Kinesis appender, You need to add the dependency(aws-java-sdk-kinesis). -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-kinesis</artifactId>
<version>${aws.version}</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 Fluency appender, You need to add the dependency(fluency). -->
<dependency>
<groupId>org.komamitsu</groupId>
<artifactId>fluency-core</artifactId>
<version>${fluency.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.komamitsu</groupId>
<artifactId>fluency-fluentd</artifactId>
<version>${fluency.version}</version>
<optional>true</optional>
</dependency>
</dependencies>
You can find the sample configuration files here: