I tried using this library in my project at work. Alas, the project uses Log4j as the logging library - which leads to an exception in the constructor of the LogRecorder (a NoClassDefFound in case of the test project attached below):
public LogRecorder(Class<?> type) {
this.logger = (Logger) LoggerFactory.getLogger(type);
}
I tried changing the Logger type from the Logback (ch.qos.logback.classic.Logger) one to the SLF4J interface (org.slf4j.Logger), but that doesn't have the addAppender method :/
Since this could be quite an undertaking, I suggest adding to the Readme that only Logback is supported for now, to avoid confusion.
I have attached an example project that uses Log4j2 below.
Log4j2Project.zip
I tried using this library in my project at work. Alas, the project uses Log4j as the logging library - which leads to an exception in the constructor of the
LogRecorder(aNoClassDefFoundin case of the test project attached below):I tried changing the Logger type from the Logback (
ch.qos.logback.classic.Logger) one to the SLF4J interface (org.slf4j.Logger), but that doesn't have theaddAppendermethod :/Since this could be quite an undertaking, I suggest adding to the Readme that only Logback is supported for now, to avoid confusion.
I have attached an example project that uses Log4j2 below.
Log4j2Project.zip