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.

Configuration Steps

  1. Configure the directory path of your logs in the already created apminsightnode.json file.
  2. Pass the complete path in the logsDir key.
  3. 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"
}
Note

 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.

Shortlink has been copied!