Logback Flume Appender

the parent artifact of TIS

License

License

Categories

Categories

Logback Application Layer Libs Logging
GroupId

GroupId

com.qlangtech.tis
ArtifactId

ArtifactId

logback-flume-appender
Last Version

Last Version

1.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

Logback Flume Appender
the parent artifact of TIS
Source Code Management

Source Code Management

https://github.com/gilt/logback-flume-appender

Download logback-flume-appender

How to add to project

<!-- https://jarcasting.com/artifacts/com.qlangtech.tis/logback-flume-appender/ -->
<dependency>
    <groupId>com.qlangtech.tis</groupId>
    <artifactId>logback-flume-appender</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.qlangtech.tis/logback-flume-appender/
implementation 'com.qlangtech.tis:logback-flume-appender:1.0.3'
// https://jarcasting.com/artifacts/com.qlangtech.tis/logback-flume-appender/
implementation ("com.qlangtech.tis:logback-flume-appender:1.0.3")
'com.qlangtech.tis:logback-flume-appender:jar:1.0.3'
<dependency org="com.qlangtech.tis" name="logback-flume-appender" rev="1.0.3">
  <artifact name="logback-flume-appender" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.qlangtech.tis', module='logback-flume-appender', version='1.0.3')
)
libraryDependencies += "com.qlangtech.tis" % "logback-flume-appender" % "1.0.3"
[com.qlangtech.tis/logback-flume-appender "1.0.3"]

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.flume : flume-ng-sdk jar 1.5.0.1
ch.qos.logback : logback-core jar 1.1.3
ch.qos.logback : logback-classic jar 1.1.3

test (1)

Group / Artifact Type Version
junit : junit jar 3.8.1

Project Modules

There are no modules declared in this project.

logback-flume-appender

Logback appender to forward log messages to a Flume agent

Configuration Entries

  • application: Application name, if unset it will be inferred from the application.name system property
  • hostname: Host name, if unset it will be inferred from the box host name via InetAddress.getLocalHost().getHostName()
  • type: Type of logging, will be ignored if unset
  • flumeAgents: Comma separated list of flume avro agents in format {hostname}:{port}
  • flumeProperties: Additional properties to create the flume RpcClient in format {key}={value} separated by ;
  • batchSize: Set the batch size of events to report, overriding the default of 50
  • reportingWindow: Override the maximum time spent trying to fill a batch, between 100ms and 10s
  • additionalAvroHeaders: Add additional headers to the events in format {key}={value} separated by ;
  • reporterMaxThreadPoolSize: Set the maximum number of threads for the reporter to use, overriding the default 2
  • reporterMaxQueueSize: Set the maximum number of event batches to keep in memory, overriding the default 50

Sample configuration

<configuration debug="true">
     <appender name="flume" class="com.gilt.logback.flume.FlumeLogstashV1Appender">
         <flumeAgents>
             flume-es-1b.gilt.com:5000,
             flume-es-1c.gilt.com:5000,
             flume-es-1d.gilt.com:5000
         </flumeAgents>
         <flumeProperties>
             connect-timeout=4000;
             request-timeout=8000
         </flumeProperties>
         <batchSize>100</batchSize>
         <reportingWindow>1000</reportingWindow>
         <additionalAvroHeaders>
             myHeader=myValue
         </additionalAvroHeaders>
         <application>smapleapp</application>
         <layout class="ch.qos.logback.classic.PatternLayout">
             <pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - \(%file:%line\) - %message%n%ex</pattern>
         </layout>
     </appender>

     <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
         <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
             <level>WARN</level>
         </filter>
         <encoder>
             <pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - \(%file:%line\) - %message%n%ex</pattern>
         </encoder>
     </appender>

     <logger name="play" level="INFO" />
     <logger name="application" level="DEBUG" />

     <!-- Off these ones as they are annoying, and anyway we manage configuration ourselves -->
     <logger name="com.avaje.ebean.config.PropertyMapLoader" level="OFF" />
     <logger name="com.avaje.ebeaninternal.server.core.XmlConfigLoader" level="OFF" />
     <logger name="com.avaje.ebeaninternal.server.lib.BackgroundThread" level="OFF" />
     <logger name="com.gargoylesoftware.htmlunit.javascript" level="OFF" />

     <root level="INFO">
         <appender-ref ref="flume" />
         <appender-ref ref="console"/>
     </root>
 </configuration>
com.qlangtech.tis

Gilt Tech

Versions

Version
1.0.3