Package com.avoka.tm.svc
Class EventLogger
java.lang.Object
com.avoka.tm.svc.EventLogger
Provides an Event Logger service which will log [ INFO, WARN | ERROR | SECURITY ] events to the Transact event log database table.
Event Log records are not encrypted and should not contain sensitive PII data.
Examples
Please find the event logger examples below.Create Info Event Log Record
The example below creates a 'Info' Event Log record associated with the specified transaction record.
 import com.avoka.tm.svc.*
 new EventLogger()
      .setMessage("IDV-Status - application completed")
      .setTxn(txn)
      .logInfo()  
 Create Security Event Log Record
The example below creates a 'Security' Event Log record associated with the specified transaction record. This example configures the EventLogger not to write the sensitive event log message to the server.log file.
 import com.avoka.tm.svc.*
 new EventLogger()
      .setMessage("Fraud Event with application : " + txn.formStatus + " : " + txn.formDataMap)
      .setRequest(request)
      .setTxn(txn)
      .setWriteToLogger(false)
      .logSecurity()  - Since:
- 5.0.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidlogError()Log an Error event log record.voidlogInfo()Log an Information event log record.voidLog an Security event log record.voidLog an Warning event log record.setMessage(String message) Set the event log message property.setRequest(jakarta.servlet.http.HttpServletRequest request) Set the request property to log.Set the transaction to associate with the event log.Set the transaction record id to associate with the event log.setWriteToLogger(boolean writeToLogger) Specify whether to write a message to the Log4J server.log file.
- 
Constructor Details- 
EventLoggerpublic EventLogger()
 
- 
- 
Method Details- 
setMessageSet the event log message property.- Parameters:
- message- the message to log
- Returns:
- the event logger
 
- 
setRequestSet the request property to log.- Parameters:
- request- the message to log
- Returns:
- the event logger
 
- 
setTxnSet the transaction to associate with the event log.- Parameters:
- txn- the transaction to associate with the event log
- Returns:
- the event logger
 
- 
setTxnIdSet the transaction record id to associate with the event log.- Parameters:
- txnId- the transaction record id to associate with the event log
- Returns:
- the event logger
 
- 
setWriteToLoggerSpecify whether to write a message to the Log4J server.log file.- Parameters:
- writeToLogger- specify whether to write a message to the Log4J server.log file
- Returns:
- the event logger
 
- 
logInfopublic void logInfo()Log an Information event log record.
- 
logWarningpublic void logWarning()Log an Warning event log record.
- 
logErrorpublic void logError()Log an Error event log record.
- 
logSecuritypublic void logSecurity()Log an Security event log record.
 
-