You can enable trace for a running node application, or you can enable trace before an application has been started.
About this task
- To enable trace before an application has been started, you can set the following environment variables:
- On Windows:
- On Linux and Mac OS:
- To enable trace for a running node application, you must first find the process ID for the application, and complete the following the steps.
- Open a command prompt in the
node_module/mqlightfolder of the client install.
- Run the
mqlight-debugapplication, supplying the process ID and a trace level.
node bin/mqlight-debug.js -p
What to do next
The examples provided start with a logging level of ‘debug’. The following levels of trace are also available:
entry_exit– log function entry and exit (with return codes).
entry_exit, but with function parameters logged as well.
entry_exit, but with additional data logging.
entry_exit, but with additional debug entries.
entry_exit, but with higher detail data logging.
all– log everything (this can quickly output a high volume of data).
By default, log output goes to the
STDERR directory. This can be changed to
STDOUT by setting the environment variable
The output can also be sent to a file, by setting