Skip to content

varshneyjayant/loggly-log4j

Repository files navigation

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");

About

Log4j Appender for Loggly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages