public class DefaultLogger extends AutomaticBean implements AuditListener
XMLLogger
Constructor and Description |
---|
DefaultLogger(OutputStream outputStream,
boolean closeStreamsAfterUse)
Creates a new
DefaultLogger instance. |
DefaultLogger(OutputStream infoStream,
boolean closeInfoAfterUse,
OutputStream errorStream,
boolean closeErrorAfterUse)
Creates a new
DefaultLogger instance. |
DefaultLogger(OutputStream infoStream,
boolean closeInfoAfterUse,
OutputStream errorStream,
boolean closeErrorAfterUse,
boolean printSeverity)
Creates a new
DefaultLogger instance. |
Modifier and Type | Method and Description |
---|---|
void |
addError(AuditEvent event)
Print an Emacs compliant line on the error stream.
|
void |
addException(AuditEvent event,
Throwable throwable)
Notify that an exception happened while performing audit.
|
void |
auditFinished(AuditEvent event)
Notify that the audit is finished.
|
void |
auditStarted(AuditEvent event)
Notify that the audit is about to start.
|
void |
fileFinished(AuditEvent event)
Notify that audit is finished on a specific file.
|
void |
fileStarted(AuditEvent event)
Notify that audit is about to start on a specific file.
|
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public DefaultLogger(OutputStream outputStream, boolean closeStreamsAfterUse)
DefaultLogger
instance.outputStream
- where to log infos and errorscloseStreamsAfterUse
- if oS should be closed in auditFinished()public DefaultLogger(OutputStream infoStream, boolean closeInfoAfterUse, OutputStream errorStream, boolean closeErrorAfterUse, boolean printSeverity)
DefaultLogger
instance.infoStream
- the OutputStream
for info messages.closeInfoAfterUse
- auditFinished should close infoStream.errorStream
- the OutputStream
for error messages.closeErrorAfterUse
- auditFinished should close errorStreamprintSeverity
- if severity level should be printed.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 event)
addError
in interface AuditListener
event
- the event detailsAuditListener
public void addException(AuditEvent event, Throwable throwable)
AuditListener
addException
in interface AuditListener
event
- the event detailsthrowable
- details of the exceptionpublic void auditStarted(AuditEvent event)
AuditListener
auditStarted
in interface AuditListener
event
- the event detailspublic void fileFinished(AuditEvent event)
AuditListener
fileFinished
in interface AuditListener
event
- the event detailspublic void fileStarted(AuditEvent event)
AuditListener
fileStarted
in interface AuditListener
event
- the event detailspublic void auditFinished(AuditEvent event)
AuditListener
auditFinished
in interface AuditListener
event
- the event detailsCopyright © 2001–2015. All rights reserved.