nzjess / statsd-over-slf4j

A Java statsd client, combined with an SLF4J compatible logging facility.
BSD 2-Clause "Simplified" License
19 stars 6 forks source link

Does Statsd-over-slf4j support log4j2? #7

Open mockhook opened 5 years ago

mockhook commented 5 years ago

Hi, this project statsd-over-slf4j is useful, but it support log4j2?

nzjess commented 5 years ago

Not at the moment, but there's no reason it couldn't. The idea is it should support any backend that works with SLF4J, which includes Log4j2: https://logging.apache.org/log4j/2.0/log4j-slf4j-impl/

We need to implement the Log4j2 equivalent of this one: StatsdLogbackAppender.java Which might best be done by refactoring some of what's in that class into an abstract base class. What we need is to implement StatsdLog4j2Appender.java, or whatever.

Feel free to give it a go and/or submit a patch.

Cheers, Jesse.