Schedule demo

APM Insight Node.js Agent custom logs directory


For Node.js applications, you can configure your own directory for your agent logs. To do so, configure the directory path of your logs in the first line of your node.js application startup file. Pass the complete path in the logsDir key.

The log directory path varies based on the platform. For Windows, logs directory format should include double backslash in path separator. For Linux, single forward slash will be used as the path separator.

Example:

In Linux,

require('apminsight')({
    licenseKey : 'APMI_ee42094f83dd841d16b9c56796c22b63bef00ac6918f547280947d1f6c2be1ea',
    appName : 'Insight_NodeJS',
    port : 3000,
    apmHost: 'localhost',
    apmPort: 8443,
    logsDir: '/Users/learn/logs'
})

In Windows,

require('apminsight')({
    licenseKey : 'APMI_ee42094f83dd841d16b9c56796c22b63bef00ac6918f547280947d1f6c2be1ea',
    appName : 'Insight_NodeJS',
    port : 3000,
    apmHost: 'localhost',
    apmPort: 8443,
    logsDir: 'C:\\users\\logs'
})

Loved by customers all over the world

"Standout Tool With Extensive Monitoring Capabilities"

It allows us to track crucial metrics such as response times, resource utilization, error rates, and transaction performance. The real-time monitoring alerts promptly notify us of any issues or anomalies, enabling us to take immediate action.

Reviewer Role: Research and Development

carlos-rivero
"I like Applications Manager because it helps us to detect issues present in our servers and SQL databases."
Carlos Rivero

Tech Support Manager, Lexmark

Trusted by over 6000+ businesses globally