We are setting up a new node.js project with a New Relic agent so that we can collect and forward the application logs as per docs.
Currently the path for the logs is configured in newrelic.js
for this project like so:
filepath: require('path').join(process.cwd(), 'newrelic_agent_btt-data-api.log'),
and that generates a log in the current directory of the project.
We would like to be able to set the above configuration such that we it's pointing it to a Kubernetes mount, say in the form of:
volumes:
- name: newrelic-volume
emptyDir: {}
volumeMounts:
- mountPath: /var/newrelic
name: newrelic-volume
How would the above filepath
in the newrelic.js
need to change to accommodate for this?
Thank you in advance.