By default, nrfutil trace stm writes decoded trace data to standard output.
The default format is human-readable ASCII (--output-type ascii).
Use the command without redirecting standard output when you want to view logs in the console, pipe them to another tool, or process them in a script.
To save decoded output to a file, redirect standard output (for example, > live_trace.txt).
To write decoded binary data to standard output instead of ASCII, pass --output-type binary.
For example, the following command decodes a captured trace file and prints ASCII output to the console:
nrfutil trace stm --input-file stm_trace.bin
The following command decodes the same file and writes binary output to standard output:
nrfutil trace stm --input-file stm_trace.bin --output-type binary
To additionally persist the undecoded trace stream while capturing or converting, use --output-raw <PATH>.
See Converting trace data for offline file conversion examples.