Skip to content
Log4j Appender for Loggly
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
loggly-log4j-sample/src
loggly-log4j/src/loggly/log4j
.gitattributes
.gitignore
README.md

README.md

loggly-log4j

Log4j Appender for Loggly

A Simple Log4j appender to send logs to Loggly via Http or Https asynchronously. Check out Loggly's Log4j logging documentation to learn more.

This uses a custom Threadpool to keep the threads in a pool, increasing the performance of the program. This library supports multiple tags and proxy setup for the network connection.

Usage:


log4j.properties:

  log4j.appender.loggly=loggly.log4j.LogglyAppender
  log4j.appender.loggly.layout=org.apache.log4j.PatternLayout
  log4j.appender.loggly.layout.ConversionPattern=%d{ISO8601} %p %t %c{1}.%M - %m%n
  log4j.appender.loggly.endpointUrl=http://logs-01.loggly.com/inputs/TOKEN/tag/log4j,customTag1,customTag2

MainProgram.java

  import org.apache.log4j.Logger;
  
  private static final Logger logger = Logger.getLogger(MainProgram.class);
  logger.info("Test log");
You can’t perform that action at this time.