Nodejs newrelic throws Error: EACCES, open '/newrelic_agent.log'
I just tried to get newrelic tracking on my node production app ( http://newrelic.com/nodejs ), however I am getting the following error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: EACCES, open '/newrelic_agent.log'
According to newrelic node is written to the same directory. However, it seems to me that it is trying to enter the root directory ?!
Manually creating a file at the server root works. However, this is not what I like to do. This is mistake?
How do I set the path to the log?
source to share
You can change the path to the log in the config file newrelic.js
.
logging : {
filepath : 'log_path_here'
}
or
You can set the path to the log using an environment variable. You are using an environment variable NEW_RELIC_LOG
.
Parameters for overriding environment variables entered in the configuration file newrelic.js
.
source to share