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-291FDBF49CFF
Where,
2024-10-30 10:31:38.454
is the time stamp in YYYY-MM-DD HH:MM:SS.SSS format.INFO
is the log level.helidon-server-2
is the name of the Java application for which the log is generated.oracle.tmm.jta.common.TrmXAResource
is 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-fa81b096adb1
is the unique transaction ID.new CTX allocate xaOp: PREPARE GTRID: e9cd912b-323c-4798-91b4-fa81b096adb1 bqual: TCS01-0001 rmid: 4F58D282-0DE1-453C-B872-291FDBF49CFF
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 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-token
Where,
2024-10-30 10:31:56.785
is the time stamp in YYYY-MM-DD HH:MM:SS.SSS format.DEBUG
is the log level.nio-8082-exec-3
is the name of the Spring REST application for which the log is generated.c.o.microtx.common.HeaderPropagation
is 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-fa81b096adb1
is the unique transaction ID.Authz Header Propagated: oracle-tmm-tx-token
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.
Parent topic: Logs