By default, the Node.js agent generates log information at the informational level. You can increase or decrease the logging verbosity, change the log file location, and configure other logging settings.
Node.js Agent Logging Location
The log file appears at the following location on the machine where the Node.js Agent runs:
Where hash is the portion of the path as used for the Java proxy.
Configure Node.js Agent Logging
To configure logging, use the logging module configuration in the Node.js require statement.
The following sample shows the logging settings when you are in libagent mode:
The following sample shows the logging settings when you are in proxy mode:
As illustrated, you can change the level, maximum size or number of files, and mode.
The level determines the verbosity of logging output. It can have one these values, as listed from least to most verbose:
By default, once the size of the logging files on disk reaches the maximum size, old logs are purged. You can reduce or increase the size, depending on your needs and the disk space available on the machine.
The proxy logs the transactions that are accepted from the agent and sent to the Controller. The proxy generates logs independently of the Node.js Agent logging level or activity.
When the Node.js agent launches the proxy, it prints the directory path at which the proxy is logging to its own log. By default the proxy log is in /tmp/appd/logs.
See Dynamic Agent Proxy Logging for details.
Instead of using the logging configuration shown above, you can use the shortcut of setting DEBUG to true, as follows:
debug : true,
This results in debug level logging, with the location of the debug log file written to standard output.
See Node.js Agent Settings for more information on configuring the Node.js Agent.