13.4.2 Sample Log Messages

View example log messages and their syntax.

Messages are logged based on the syntax that you have provided in the parser filters as described in Define the Syntax of Log Messages.

Syntax of Logs Generated by the MicroTx Coordinator

The MicroTx coordinator log files are in JSON format. As shown in the following log snippet, every log generated by the coordinator is associated with a transactionId field. This is the unique ID for a transaction. In case of any failure, you can use this ID to track all the messages related to a transaction. The msg field provides the actual logs associated to the transaction ID.

{
  "level": "debug",
  "ts": 1695737654.51672,
  "caller": "xa/server.go:409",
  "msg": "set xa tx expiry timer",
  "transactionId": "9f3efc1c-a831-4d9d-bb53-52337363fcc4"
}

Syntax of Logs Generated by the MicroTx Java Client Libraries

As shown in the following snippet, every log message generated by the MicroTx Java client libraries is associated with transactionId. This is the unique ID for a transaction. In case of any failure, you can use this ID to track all the messages related to a transaction.

2023-09-28 13:08:36.877  INFO  --- [helidon-2] oracle.tmm.jta.filter.TrmTransactionResponseFilter :
          ccdd6bb2-1376-4d21-9e40-125dc4eaedb3 : TrmTransactionResponseFilter Response Status : 200

Where,

  • 2023-09-28 13:08:36.877 is the time stamp in YYYY-MM-DD HH:MM:SS.SSS format.
  • INFO is the log level.
  • helidon-2 is the name of the Java application for which the log is generated.
  • oracle.tmm.jta.filter.TrmTransactionResponseFilter is the name of the class for which the log is generated.
  • ccdd6bb2-1376-4d21-9e40-125dc4eaedb3 is the unique ID for a transaction.
  • TrmTransactionResponseFilter Response Status : 200 is the actual log message associated with the transaction ID.

You can use Mapped Diagnostic Context (MDC) key to change the position of the transaction ID in the logs. See Define the Syntax of Log Messages.

Syntax of Logs for MicroTx Node.js Client Libraries

As shown in the following snippet, every log message generated by the MicroTx Node.js client libraries is prefixed with the transaction ID. This is the unique ID for a transaction. In case of any failure, you can use this ID to track all the messages related to a transaction.

2023-09-28 6:53:56.678 :: edc36bc0-823e-4660-886f-d7e67c97aa80 - Service Enlisted with LRA : http://localhost:9000/api/v1/lra-coordinator/edc36bc0-823e-4660-886f-d7e67c97aa80

Where,

  • 2023-09-28 6:53:56.678 is the time stamp in YYYY-MM-DD HH:MM:SS.SSS format.
  • edc36bc0-823e-4660-886f-d7e67c97aa80 is the unique ID of the transaction.
  • Service Enlisted with LRA : http://localhost:9000/api/v1/lra-coordinator/edc36bc0-823e-4660-886f-d7e67c97aa80 is the message.