Use the lttng command line tool to create, start and then stop and view a tracing session.
Procedure
- Ensure that the microservice you wish to trace is not running.
- On a Unix command line prompt, create a new tracing session by entering the following command:
lttng create session-name
where session-name is a unique name for this tracing session.
- Enable Log4j logging with the following command:
- Start the tracing session with the following command:
- Start the microservice.
- When you want to stop the tracing session and view the logs, enter the following commands: