public class DefaultLogger extends AutomaticBean implements AuditListener
XMLLoggerAutomaticBean.OutputStreamOptions| Modifier and Type | Field and Description |
|---|---|
static String |
ADD_EXCEPTION_MESSAGE
A key pointing to the add exception
message in the "messages.properties" file.
|
static String |
AUDIT_FINISHED_MESSAGE
A key pointing to the finished audit
message in the "messages.properties" file.
|
static String |
AUDIT_STARTED_MESSAGE
A key pointing to the started audit
message in the "messages.properties" file.
|
| Constructor and Description |
|---|
DefaultLogger(OutputStream outputStream,
AutomaticBean.OutputStreamOptions outputStreamOptions)
Creates a new
DefaultLogger instance. |
DefaultLogger(OutputStream infoStream,
AutomaticBean.OutputStreamOptions infoStreamOptions,
OutputStream errorStream,
AutomaticBean.OutputStreamOptions errorStreamOptions)
Creates a new
DefaultLogger instance. |
DefaultLogger(OutputStream infoStream,
AutomaticBean.OutputStreamOptions infoStreamOptions,
OutputStream errorStream,
AutomaticBean.OutputStreamOptions errorStreamOptions,
AuditEventFormatter messageFormatter)
Creates a new
DefaultLogger instance. |
DefaultLogger(OutputStream outputStream,
boolean closeStreamsAfterUse)
Deprecated.
in order to fulfill demands of BooleanParameter IDEA check.
|
DefaultLogger(OutputStream infoStream,
boolean closeInfoAfterUse,
OutputStream errorStream,
boolean closeErrorAfterUse)
Deprecated.
in order to fulfill demands of BooleanParameter IDEA check.
|
DefaultLogger(OutputStream infoStream,
boolean closeInfoAfterUse,
OutputStream errorStream,
boolean closeErrorAfterUse,
AuditEventFormatter messageFormatter)
Deprecated.
in order to fulfill demands of BooleanParameter IDEA check.
|
| 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.
|
protected void |
finishLocalSetup()
Provides a hook to finish the part of this component's setup that
was not handled by the bean introspection.
|
configure, contextualize, getConfiguration, setupChildpublic static final String ADD_EXCEPTION_MESSAGE
public static final String AUDIT_STARTED_MESSAGE
public static final String AUDIT_FINISHED_MESSAGE
@Deprecated public DefaultLogger(OutputStream outputStream, boolean closeStreamsAfterUse)
DefaultLogger instance.outputStream - where to log infos and errorscloseStreamsAfterUse - if oS should be closed in auditFinished()@Deprecated public DefaultLogger(OutputStream infoStream, boolean closeInfoAfterUse, OutputStream errorStream, boolean closeErrorAfterUse)
DefaultLogger instance.infoStream - the OutputStream for info messages.closeInfoAfterUse - auditFinished should close infoStream.errorStream - the OutputStream for error messages.closeErrorAfterUse - auditFinished should close errorStream@Deprecated public DefaultLogger(OutputStream infoStream, boolean closeInfoAfterUse, OutputStream errorStream, boolean closeErrorAfterUse, AuditEventFormatter messageFormatter)
DefaultLogger instance.infoStream - the OutputStream for info messagescloseInfoAfterUse - auditFinished should close infoStreamerrorStream - the OutputStream for error messagescloseErrorAfterUse - auditFinished should close errorStreammessageFormatter - formatter for the log message.public DefaultLogger(OutputStream outputStream, AutomaticBean.OutputStreamOptions outputStreamOptions)
DefaultLogger instance.outputStream - where to log infos and errorsoutputStreamOptions - if CLOSE that should be closed in auditFinished()public DefaultLogger(OutputStream infoStream, AutomaticBean.OutputStreamOptions infoStreamOptions, OutputStream errorStream, AutomaticBean.OutputStreamOptions errorStreamOptions)
DefaultLogger instance.infoStream - the OutputStream for info messages.infoStreamOptions - if CLOSE info should be closed in auditFinished()errorStream - the OutputStream for error messages.errorStreamOptions - if CLOSE error should be closed in auditFinished()public DefaultLogger(OutputStream infoStream, AutomaticBean.OutputStreamOptions infoStreamOptions, OutputStream errorStream, AutomaticBean.OutputStreamOptions errorStreamOptions, AuditEventFormatter messageFormatter)
DefaultLogger instance.infoStream - the OutputStream for info messagesinfoStreamOptions - if CLOSE info should be closed in auditFinished()errorStream - the OutputStream for error messageserrorStreamOptions - if CLOSE error should be closed in auditFinished()messageFormatter - formatter for the log message.protected void finishLocalSetup() throws CheckstyleException
AutomaticBeanThe default implementation does nothing.
finishLocalSetup in class AutomaticBeanCheckstyleException - if there is a configuration error.public void addError(AuditEvent event)
addError in interface AuditListenerevent - the event detailsAuditListenerpublic void addException(AuditEvent event, Throwable throwable)
AuditListeneraddException in interface AuditListenerevent - the event detailsthrowable - details of the exceptionpublic void auditStarted(AuditEvent event)
AuditListenerauditStarted in interface AuditListenerevent - the event detailspublic void auditFinished(AuditEvent event)
AuditListenerauditFinished in interface AuditListenerevent - the event detailspublic void fileStarted(AuditEvent event)
AuditListenerfileStarted in interface AuditListenerevent - the event detailspublic void fileFinished(AuditEvent event)
AuditListenerfileFinished in interface AuditListenerevent - the event detailsCopyright © 2001–2018. All rights reserved.