Accessing logfiles for specific flows/nodes running docker

I'm running Node-Red in Docker v2.2.2 and I'm running into a problem with one flow/node and I'd like to access the logfiles to see, what's going on. I searched in /data, which is mapped to my Synology, but there are no logfiles and /var/log in the console is completely empty.

Is there a way to access/activate trace logging for a docker so I can see, what happens?

Thanks.

As with nearly all Docker containers, Node-RED logs to standard out. Where that ends up will be down to how your docker instance is configured.

You can normally view the log with the following command

docker logs [container name]

If you include -f then it will stand the log in real time

1 Like

thanks, I'll have a look, but I also meant, is there a way to activate TRACE logging for a specific node or module?

Not really, you can change the logging level for all of Node-RED but that will only get you more information about the framework and at trace level will give you an event every time a message passes between nodes, but there is no way to see what's happening inside a node unless the author has specifically added something independently.

Look for the logging entry in the settings.js file

You can always attach a NodeJS debugger, but that is a much longer conversation, especially when connecting to a remote docker container.

THere is another alternative that I've used and shared a while back.

You can create a custom logger in settings.js. With that, you can filter out just the nodes you are interested in (assuming that their outputs identify themselves).