Package com.illumon.iris.db.util.logging
Class ProcessEventLogInterceptorCsv
java.lang.Object
com.illumon.iris.db.util.logging.ProcessEventLogInterceptorCsv
- All Implemented Interfaces:
IProcessEventLogInterceptor
Implementation of
IProcessEventLogInterceptor which writes to CSV files. Several properties control the behavior
of this interceptor.
PROCESS_LOG_INTERCEPT_CSV_DIRECTORY_PROP(mandatory) specifies the directory into which files will be writtenPROCESS_LOG_INTERCEPT_CSV_FORMAT_PROPspecifies the CSV format, defaults to Excel (seeCSVFormat.PredefinedPROCESS_LOG_INTERCEPT_CSV_DELIMITER_PROPspecifies the delimiter, defaults to the default for the CSV formatPROCESS_LOG_INTERCEPT_CSV_QUEUE_CAPACITY_PROPspecifies the queue size for outstanding events to be written to the CSV file; if this is exceeded, events will be ignoredPROCESS_LOG_INTERCEPT_CSV_ROLLOVER_DAILY_PROPspecifies whether the files should rollover each day, defaults to truePROCESS_LOG_INTERCEPT_CSV_ROLLOVER_HOURLY_PROPspecifies whether the files should rollover each hour, defaults to false and if set to true takes precedence overPROCESS_LOG_INTERCEPT_CSV_ROLLOVER_DAILY_PROPPROCESS_LOG_INTERCEPT_CSV_TIMEZONE_PROPdefines a timezone for the rollover (defaults to system default)PROCESS_LOG_INTERCEPT_CSV_FLUSH_MESSAGEShow frequently to flush the queue to disk (it will always flush when emptied)PROCESS_LOG_INTERCEPT_CSV_TRIM_FINAL_NEWLINEif true, the last newline at the end of PEL messages will be trimmed before writing the default value is 100PROCESS_LOG_INTERCEPT_CSV_INCLUDE_FIELDSa space or comma separated list of case-insensitive field names to include in the cvs file. If blank or not present, all fields will be logged. Field values must be in this set: [timestamp, host, level, process, authorizedUser, effectiveUser, logEntry, processInfoId].
-
Constructor Summary
ConstructorsConstructorDescriptionProcessEventLogInterceptorCsv(com.fishlib.configuration.Configuration configuration, String hostName, String processName) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close (and flush) all resources associated with this interceptor.voidintercept(long timestamp, String host, String level, String process, String processInfoId, UserContext userContext, String logEntry) An intercept event with the specified PEL data.
-
Constructor Details
-
ProcessEventLogInterceptorCsv
-
-
Method Details
-
intercept
public void intercept(long timestamp, String host, String level, String process, String processInfoId, UserContext userContext, String logEntry) Description copied from interface:IProcessEventLogInterceptorAn intercept event with the specified PEL data.- Specified by:
interceptin interfaceIProcessEventLogInterceptor- Parameters:
timestamp- the timestamphost- the hostlevel- the log levelprocess- the process nameuserContext- the user contextlogEntry- the log entry
-
close
public void close()Description copied from interface:IProcessEventLogInterceptorClose (and flush) all resources associated with this interceptor.- Specified by:
closein interfaceIProcessEventLogInterceptor
-