ErrorLogFile: Call ConsoleAppender.activateOptions()

This is required to prepare the appender for use, otherwise the
following error is printed:

log4j:ERROR No output stream or file set for the appender named [null].

Change-Id: I76734dd4c162cf4f897688599b4050514cc1c920
This commit is contained in:
Dave Borowitz 2015-06-09 15:11:52 -07:00
parent b01b8721b2
commit 44ed9494f7

View File

@ -45,6 +45,7 @@ public class ErrorLogFile {
dst.setLayout(layout);
dst.setTarget("System.err");
dst.setThreshold(Level.ERROR);
dst.activateOptions();
final Logger root = LogManager.getRootLogger();
root.removeAllAppenders();