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