|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jwall.web.audit.io.ConcurrentAuditWriter
public class ConcurrentAuditWriter
This class implements a simple writer that writes audit-events in the concurrent log format of modsecurity. It can be used with the AuditLogger tool to create concurrent audit-logs. It can also be used to convert serial auditlogs into the concurrent log format.
| Field Summary | |
|---|---|
static java.text.SimpleDateFormat |
DATE_FORMAT
|
static java.text.SimpleDateFormat |
DIR_FORMAT
|
| Constructor Summary | |
|---|---|
ConcurrentAuditWriter(java.io.File baseDir)
Create a new audit-writer that writes events into sub-directories below the given directory base according to their date. |
|
ConcurrentAuditWriter(java.io.File baseDir,
java.io.File indexFile)
This constructor creates a new instance of the class that writes all events to files within the given directory baseDir. |
|
| Method Summary | |
|---|---|
static java.lang.String |
createSummary(AuditEvent evt)
This method creates a summary-string from the given audit-event. |
void |
writeEvent(AuditEvent evt)
This method writes the given audit-event evt to a file, whose name is
deducted from the creation time of the event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.text.SimpleDateFormat DIR_FORMAT
public static java.text.SimpleDateFormat DATE_FORMAT
| Constructor Detail |
|---|
public ConcurrentAuditWriter(java.io.File baseDir,
java.io.File indexFile)
throws java.io.IOException
baseDir. In addition to that, the
writer creates summary-entries in an index-file denoted by indexFile.
baseDir - The directory where to store the event-data files.indexFile - The file to which the index-entries are appended.
java.io.IOException - In case an IO-error occurs (file-permissions, etc.)
public ConcurrentAuditWriter(java.io.File baseDir)
throws java.io.IOException
base according to their date. The index-file is assumed to
be the file index within that directory.
baseDir - The base directory where the audit-data files are stored.
java.lang.Exception - In case base is not a directory or cannot be created or
is not writable.
java.io.IOException| Method Detail |
|---|
public void writeEvent(AuditEvent evt)
throws java.io.IOException
evt to a file, whose name is
deducted from the creation time of the event. The file is created relative to the
base-directory given at construction-time of this writer-instance.
Additionally a summary-entry will be created that is appended to the index-file.
writeEvent in interface AuditEventWriterevt - The AuditEvent-instance to be written to disk.
java.io.IOExceptionpublic static java.lang.String createSummary(AuditEvent evt)
evt - The event to create the summary from.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||