public class DefaultLogger extends AutomaticBean implements AuditListener
XMLLogger
Constructor and Description |
---|
DefaultLogger(OutputStream os,
boolean closeStreamsAfterUse)
Creates a new
DefaultLogger instance. |
DefaultLogger(OutputStream infoStream,
boolean closeInfoAfterUse,
OutputStream errorStream,
boolean closeErrorAfterUse)
Creates a new
DefaultLogger instance. |
Modifier and Type | Method and Description |
---|---|
void |
addError(AuditEvent evt)
Print an Emacs compliant line on the error stream.
|
void |
addException(AuditEvent evt,
Throwable throwable)
Notify that an exception happened while performing audit.
|
void |
auditFinished(AuditEvent evt)
Notify that the audit is finished.
|
void |
auditStarted(AuditEvent evt)
Notify that the audit is about to start.
|
protected void |
closeStreams()
Flushes the output streams and closes them if needed.
|
void |
fileFinished(AuditEvent evt)
Notify that audit is finished on a specific file.
|
void |
fileStarted(AuditEvent evt)
Notify that audit is about to start on a specific file.
|
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public DefaultLogger(OutputStream os, boolean closeStreamsAfterUse)
DefaultLogger
instance.os
- where to log infos and errorscloseStreamsAfterUse
- if oS should be closed in auditFinished()public DefaultLogger(OutputStream infoStream, boolean closeInfoAfterUse, OutputStream errorStream, boolean closeErrorAfterUse)
DefaultLogger
instance.infoStream
- the OutputStream
for info messagescloseInfoAfterUse
- auditFinished should close infoStreamerrorStream
- the OutputStream
for error messagescloseErrorAfterUse
- auditFinished should close errorStreampublic void addError(AuditEvent evt)
addError
in interface AuditListener
evt
- the event detailsAuditListener
public void addException(AuditEvent evt, Throwable throwable)
addException
in interface AuditListener
evt
- the event detailsthrowable
- details of the exceptionpublic void auditStarted(AuditEvent evt)
auditStarted
in interface AuditListener
evt
- the event detailspublic void fileFinished(AuditEvent evt)
fileFinished
in interface AuditListener
evt
- the event detailspublic void fileStarted(AuditEvent evt)
fileStarted
in interface AuditListener
evt
- the event detailspublic void auditFinished(AuditEvent evt)
auditFinished
in interface AuditListener
evt
- the event detailsprotected void closeStreams()
Copyright © 2001–2015. All rights reserved.