public class XMLLogger extends AutomaticBean implements AuditListener
AutomaticBean.OutputStreamOptions
Constructor and Description |
---|
XMLLogger(OutputStream outputStream,
AutomaticBean.OutputStreamOptions outputStreamOptions)
Creates a new
XMLLogger instance. |
XMLLogger(OutputStream outputStream,
boolean closeStream)
Deprecated.
in order to fulfill demands of BooleanParameter IDEA check.
|
Modifier and Type | Method and Description |
---|---|
void |
addError(AuditEvent event)
Notify that an audit error was discovered on a specific file.
|
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.
|
static String |
encode(String value)
Escape <, > & ' and " as their entities.
|
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.
|
static boolean |
isReference(String ent)
Finds whether the given argument is character or entity reference.
|
configure, contextualize, getConfiguration, setupChild
@Deprecated public XMLLogger(OutputStream outputStream, boolean closeStream)
XMLLogger
instance.
Sets the output to a defined stream.outputStream
- the stream to write logs to.closeStream
- close oS in auditFinishedpublic XMLLogger(OutputStream outputStream, AutomaticBean.OutputStreamOptions outputStreamOptions)
XMLLogger
instance.
Sets the output to a defined stream.outputStream
- the stream to write logs to.outputStreamOptions
- if CLOSE
stream should be closed in auditFinished()protected void finishLocalSetup() throws CheckstyleException
AutomaticBean
The default implementation does nothing.
finishLocalSetup
in class AutomaticBean
CheckstyleException
- if there is a configuration error.public void auditStarted(AuditEvent event)
AuditListener
auditStarted
in interface AuditListener
event
- the event detailspublic void auditFinished(AuditEvent event)
AuditListener
auditFinished
in interface AuditListener
event
- the event detailspublic void fileStarted(AuditEvent event)
AuditListener
fileStarted
in interface AuditListener
event
- the event detailspublic void fileFinished(AuditEvent event)
AuditListener
fileFinished
in interface AuditListener
event
- the event detailspublic void addError(AuditEvent event)
AuditListener
addError
in interface AuditListener
event
- the event detailspublic void addException(AuditEvent event, Throwable throwable)
AuditListener
addException
in interface AuditListener
event
- the event detailsthrowable
- details of the exceptionpublic static String encode(String value)
value
- the value to escape.public static boolean isReference(String ent)
ent
- the possible entity to look for.Copyright © 2001–2018. All rights reserved.