How to dynamic change logging level in nodered app at runtime

I would like to change logging level of nodes (especially function node using node.debug(), node.trace(), node.log() commands to log info at the runtime.
Current logging level is set via settings. but I'm looking for solution to change it at start fo nodered code depending on value in additional config file read on start of nodered code. I was able to find object RED.settings.logging and I've tried to update it but it is not possible because of Error: Property 'logging' is read-only. Is there any wahy how to dynamically change logging level after deploy nodered app without modify and redeploy settings.js?
Thank you.

You cannot change the standard logging levels dynamically as they are only read at startup.

To do what you want, you could set up a custom logger though and build something into that. For example, I have a custom logger that takes trace-level logs but only for uibuilder and then sends the outputs to a single MQTT topic. I then have a uibuilder page that connects directly to MQTT and displays the log output on the webpage with some simple colour coding.

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