Node-RED in Docker Logging

I recently had an issue where I needed to look at the log information for my flows during a restart. Having changed the logging level to trace, I found that my view of the console messages only showed so many lines. As a result, I was unable to see the entire refresh sequence of messages.

Is there a straightforward way to get the Node-RED logging into a file when it is running inside of the standard docker container?

For my other issue, what I did get was sufficient to find my issue, but had it been earlier in the sequence, I am not sure I would have had access to see it.

if you add a -f to the docker logs line it will stream it continuously and you can direct that to a file

docker logs -f [name of container]  > log.out

or if you look in /var/lib/docker/containers there will be a directory that starts with the same as the output of docker ps in there you should find a file that has the whole output of the container's stderr/stdout

2 Likes

Thanks for the pointer.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.