Class ErrorLogger

java.lang.Object
com.avoka.tm.svc.ErrorLogger

public class ErrorLogger extends Object

Provides an Error Logger service which will log errors to the Transact error log database table.

Examples

Please find the email service examples about sending and queuing below.

Create Error Log Record For Transaction

The example below creates a Error Log record associated with the specified transaction record.

 new ErrorLogger()
      .setTxnId(txnId)
      .setError(error)
      .log() 

Create 'Form Delivery' Log Record For Transaction

The example below creates a 'Form Delivery' type error log record associated with the specified transaction record.

 new ErrorLogger()
      .setError(error)
      .setType("Form Delivery")
      .setTxn(txn)
      .log() 
Since:
5.0.0
  • Constructor Details

    • ErrorLogger

      public ErrorLogger()
  • Method Details

    • setError

      public ErrorLogger setError(Throwable error)
      The error to log.
      Parameters:
      error - the exception to log
      Returns:
      the error logger;
    • setType

      public ErrorLogger setType(String type)
      Set the error log type property use to classify the error log record.
      • Collaboration Job
      • Email
      • Form Delivery
      • Form Dynamic Data
      • Form Render
      • Form Submission
      • LiveCycle
      • Management
      • Payment Gateway
      • Receipt Render
      • REST SOAP API
      • Scheduled Job
      • Security Manager
      • T.Field Sync
      • Unclassified
      Parameters:
      type - the error log record type (required)
      Returns:
      the error logger
    • setTxn

      public ErrorLogger setTxn(Txn txn)
      Set the transaction to associate with the error log.
      Parameters:
      txn - the transaction to associate with the error log
      Returns:
      the error logger
    • setTxnId

      public ErrorLogger setTxnId(Long txnId)
      Set the transaction record id to associate with the error log.
      Parameters:
      txnId - the transaction record id to associate with the error log
      Returns:
      the error logger
    • log

      public Long log()
      Log the error creating an error log database record and return the error log record id.
      Returns:
      the new error log record id