public class SarifLogger extends AutomaticBean implements AuditListener
AutomaticBean.OutputStreamOptions| Constructor and Description |
|---|
SarifLogger(java.io.OutputStream outputStream,
AutomaticBean.OutputStreamOptions outputStreamOptions)
Creates a new
SarifLogger instance. |
| 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,
java.lang.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 java.lang.String |
escape(java.lang.String value)
Escape \b, \f, \n, \r, \t, \", \\ and U+0000 through U+001F.
|
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 java.lang.String |
readResource(java.lang.String name)
Read string from given resource.
|
configure, contextualize, getConfiguration, setupChildpublic SarifLogger(java.io.OutputStream outputStream, AutomaticBean.OutputStreamOptions outputStreamOptions) throws java.io.IOException
SarifLogger instance.outputStream - where to log audit eventsoutputStreamOptions - if CLOSE that should be closed in auditFinished()java.lang.IllegalArgumentException - if outputStreamOptions is nulljava.io.IOException - if there is reading errors.protected void finishLocalSetup()
AutomaticBeanThe default implementation does nothing.
finishLocalSetup in class AutomaticBeanpublic void auditStarted(AuditEvent event)
AuditListenerauditStarted in interface AuditListenerevent - the event detailspublic void auditFinished(AuditEvent event)
auditFinished in interface AuditListenerevent - the event detailspublic void addError(AuditEvent event)
addError in interface AuditListenerevent - the event detailspublic void addException(AuditEvent event, java.lang.Throwable throwable)
addException in interface AuditListenerevent - the event detailsthrowable - details of the exceptionpublic void fileStarted(AuditEvent event)
AuditListenerfileStarted in interface AuditListenerevent - the event detailspublic void fileFinished(AuditEvent event)
AuditListenerfileFinished in interface AuditListenerevent - the event detailspublic static java.lang.String escape(java.lang.String value)
value - the value to escape.public static java.lang.String readResource(java.lang.String name) throws java.io.IOException
name - name of the desired resourcejava.io.IOException - if there is reading errorsCopyright © 2001-2021. All Rights Reserved.