Configure custom directory for agent logs in APM Insight Node.js agent
For Node.js applications, you can configure your own directory for your agent logs.
Note: Follow the below-given instructions for APM insight Node.js agent version 2.x.
For configuration instructions regarding APM Insight Node.js agent version 1.x, refer here.
Configuration Steps for Node.js v2.x
- Configure the directory path of your logs in the already created apminsightnode.json file.
- Pass the complete path in the logsDir key.
- The log directory path varies based on the platform.
- For Linux, a single forward slash will be used as the path separator.
- For Windows, logs directory format should include a double backslash in the path separator.
Examples:
In Linux,
{
"licenseKey" : "xxxxxxxxxxxxxxxxxxxx",
"appName" : "appName",
"port" : 3000,
"logsDir" : "/Users/learn/logs"
}
In Windows,
{
"licenseKey" : "xxxxxxxxxxxxxxxxxxxx",
"appName" : "appName",
"port" : 3000,
"logsDir" : "C:\\users\\logs"
}
The related configuration files and logs from the relevant directory are not automatically erased when the agent is uninstalled. They must be manually removed by the user.
-
On this page
- Configuration Steps for Nodejs v2x