use of com.netflix.titus.api.audit.model.AuditLogEvent in project titus-control-plane by Netflix.
the class AuditEventDiskWriter method writeLog.
private void writeLog() {
try {
if (logWriter == null) {
createAuditLogFolder(auditLogFolder);
logWriter = new BufferedWriter(new FileWriter(auditLogFile, true));
}
for (AuditLogEvent event = eventQueue.poll(); event != null; event = eventQueue.poll()) {
logWriter.write(formatEvent(event));
logWriter.write('\n');
}
for (UserRequestEvent event = eventBusQueue.poll(); event != null; event = eventBusQueue.poll()) {
logWriter.write(formatEvent(event));
logWriter.write('\n');
}
logWriter.flush();
} catch (Exception e) {
logger.warn("Audit log write to disk failure ({})", e.getMessage());
}
}
Aggregations