Hi, I am using docker container of the node :8.9.3 version image, in our production nodejs application is
working fine, please help me to find the directory, where logs are being saved of the nodejs app, or how
can I store logs to analyse.
If any good opensource tool available kindly share the link for the same.
Regards
kartik
Node is a pretty big ecosystem. Which node particularly are you looking for?
You want run the docker-log to see the stdout output, right?
Assuming the following scenario:
your-daemon-or-script.js
function test() {
console.log(`Test!`)
}
setInterval(test, 1000)
Running this script as example:
docker run -d --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app node:8 node your-daemon-or-script.js
You will see the stdout running:
docker logs $(sudo docker ps -aq --filter name=my-running-script)
This command will display:
Test!
Test!
Test!
...
Closing this as being answered
thanks every one for support...
Most helpful comment
You want run the docker-log to see the stdout output, right?
Assuming the following scenario:
your-daemon-or-script.js
Running this script as example:
You will see the stdout running:
This command will display: