LOG.info("Event Log Writer enabled: " + _enabled);
File writeDir = new File(_topLevelLogDir);
if (writeDir.exists() && !writeDir.canWrite())
{
throw new InvalidConfigException("Invalid Config value : Cannot write to writeDir: " + _topLevelLogDir);
}
LOG.info("Event Log Writer writeDir: " + writeDir.getAbsolutePath());
if (_writeSessionDir == null)
{
File writeSessionDir = new File(writeDir.getAbsolutePath() + File.separator + "session" + "_" + System.currentTimeMillis());
_writeSessionDir = writeSessionDir.getAbsolutePath();
}
LOG.info("Event Log Writer writeSessionDir: " + _writeSessionDir);
Encoding encoding = null;
try
{
encoding = Encoding.valueOf(_encoding);
}
catch (Exception e)
{
throw new InvalidConfigException("Invalid Config Value for encoding: " + _encoding);
}
if (_maxFiles <=0)
{
throw new InvalidConfigException("EventLogWriter: maxFiles configured <= 0 : " + _maxFiles);
}
if (_maxPendingWrites <=0)
{
throw new InvalidConfigException("EventLogWriter: maxPendingWrites configured <=0 : " + _maxPendingWrites);
}
LOG.info("Event Log Writer encoding: " + _encoding);
LOG.info("Event Log Writer writeBatchSizeInBytes: " + _writeBatchSizeInBytes);