Giter VIP home page Giter VIP logo

logback-flume-appender's Introduction

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>

logback-flume-appender's People

Contributors

javierarrieta avatar stjohnb avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.