14.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 for Helidon Applications
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.
2024-10-30 10:31:57.009 INFO --- [helidon-server-2] oracle.tmm.jta.common.TrmXAResource : [microtx-log] e9cd912b-323c-4798-91b4-fa81b096adb1 : new CTX allocate xaOp: PREPARE GTRID: e9cd912b-323c-4798-91b4-fa81b096adb1 bqual: TCS01-0001 rmid: 4F58D282-0DE1-453C-B872-291FDBF49CFFWhere,
2024-10-30 10:31:38.454is the time stamp in YYYY-MM-DD HH:MM:SS.SSS format.INFOis the log level.helidon-server-2is the name of the Java application for which the log is generated.oracle.tmm.jta.common.TrmXAResourceis the name of the class for which the log is generated.[microtx-log]is prefixed to the log messages generated by the MicroTx library. This helps you differentiate the log messages generated by the MicroTx library from the messages generated by the application. Use[microtx-log]to filter all the log messages generated by the MicroTx library.e9cd912b-323c-4798-91b4-fa81b096adb1is the unique transaction ID.new CTX allocate xaOp: PREPARE GTRID: e9cd912b-323c-4798-91b4-fa81b096adb1 bqual: TCS01-0001 rmid: 4F58D282-0DE1-453C-B872-291FDBF49CFFis 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 Generated by the MicroTx Java Client Libraries for Spring REST Applications
As shown in the following snippet, every log message generated by the MicroTx Java client libraries for a Spring REST application 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.
2024-10-30 10:31:56.785 DEBUG 30201 --- [nio-8082-exec-3] c.o.microtx.common.HeaderPropagation : [microtx-log] e9cd912b-323c-4798-91b4-fa81b096adb1 : Authz Header Propagated: oracle-tmm-tx-tokenWhere,
2024-10-30 10:31:56.785is the time stamp in YYYY-MM-DD HH:MM:SS.SSS format.DEBUGis the log level.nio-8082-exec-3is the name of the Spring REST application for which the log is generated.c.o.microtx.common.HeaderPropagationis the name of the class for which the log is generated.[microtx-log]is prefixed to the log messages generated by the MicroTx library. This helps you differentiate the log messages generated by the MicroTx library from the messages generated by the application. Use[microtx-log]to filter all the log messages generated by the MicroTx library.e9cd912b-323c-4798-91b4-fa81b096adb1is the unique transaction ID.Authz Header Propagated: oracle-tmm-tx-tokenis 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-d7e67c97aa80Where,
2023-09-28 6:53:56.678is the time stamp in YYYY-MM-DD HH:MM:SS.SSS format.edc36bc0-823e-4660-886f-d7e67c97aa80is the unique ID of the transaction.Service Enlisted with LRA : http://localhost:9000/api/v1/lra-coordinator/edc36bc0-823e-4660-886f-d7e67c97aa80is the message.
Parent topic: Logs