use of org.apache.log4j.helpers.OnlyOnceErrorHandler in project gerrit by GerritCodeReview.
the class SystemLog method createAppender.
public static Appender createAppender(Path logdir, String name, Layout layout) {
final DailyRollingFileAppender dst = new DailyRollingFileAppender();
dst.setName(name);
dst.setLayout(layout);
dst.setEncoding(UTF_8.name());
dst.setFile(resolve(logdir).resolve(name).toString());
dst.setImmediateFlush(true);
dst.setAppend(true);
dst.setErrorHandler(new DieErrorHandler());
dst.activateOptions();
dst.setErrorHandler(new OnlyOnceErrorHandler());
return dst;
}
use of org.apache.log4j.helpers.OnlyOnceErrorHandler in project gerrit by GerritCodeReview.
the class SystemLog method createAppender.
public static Appender createAppender(Path logdir, String name, Layout layout, boolean rotate) {
final FileAppender dst = rotate ? new DailyRollingFileAppender() : new FileAppender();
dst.setName(name);
dst.setLayout(layout);
dst.setEncoding(UTF_8.name());
dst.setFile(resolve(logdir).resolve(name).toString());
dst.setImmediateFlush(true);
dst.setAppend(true);
dst.setErrorHandler(new DieErrorHandler());
dst.activateOptions();
dst.setErrorHandler(new OnlyOnceErrorHandler());
return dst;
}
Aggregations