final FileAppender appender = new FileAppender(pl, fileStr, true);
appender.setBufferedIO(false);
appender.setBufferSize(LOG_IO_BUFFER_SIZE_BYTES);
LoggerFactory loggerFactory = new LoggerFactory() {
@Override
public Logger makeNewLoggerInstance(String name) {
Logger logger = Logger.getLogger(name);
logger.addAppender(appender);
logger.setLevel(Level.INFO);
logger.setAdditivity(false);
return logger;
}
};
return loggerFactory.makeNewLoggerInstance("NagiosWriter" + this.hashCode());
}