Package com.illumon.iris.db.util.logging
Class ProcessEventLogInterceptorCsv
java.lang.Object
com.illumon.iris.db.util.logging.ProcessEventLogInterceptorCsv
- All Implemented Interfaces:
IProcessEventLogInterceptor
public class ProcessEventLogInterceptorCsv extends Object implements 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 100
-
Constructor Summary
Constructors Constructor Description ProcessEventLogInterceptorCsv(com.fishlib.configuration.Configuration configuration, String hostName, String processName) -
Method Summary
-
Constructor Details
-
Method Details
-
intercept
public void intercept(long timestamp, String host, String level, String process, com.fishlib.auth.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
-