meshtastic / node-red-contrib-meshtastic

GNU General Public License v3.0
9 stars 3 forks source link

Please remove debug logging #24

Open dustin opened 4 months ago

dustin commented 4 months ago

In my nodered container, every packet gets logged twice in such a way that doubled my monthly log quota in a small number of days. Because of the pretty printing and how journalctl likes to pass stuff onto syslog, this has resulted in tens of thousands of log entries in a given second with the small number of reachable nodes I can pick up.

This includes entries that begin with "Decoded payload to JSON:" and "Decoded payload to JSON:#015" (which is probably a nodered artifact).

In any case, it doesn't seem helpful to log the decoded packet that will be emitted to the next node. The user is free to do that if necessary by passing it down the chain.

These logs do appear to be at the debug level, but on a stock nodered install, they will easily overwhelm any other logging that might normally be going on.

va24531 commented 4 months ago

I second that! I just spent a hour tracking down two huge syslog files (25gb!) that were filled with node-red/meshtastic logs.

tail syslog report ...

Feb 11 07:08:36 pi3plus Node-RED[10011]: Outputting payload from decode node Feb 11 07:08:36 pi3plus Node-RED[10011]: Serializing ServiceEnvelope to JSON for output Feb 11 07:08:36 pi3plus Node-RED[10011]: Payload was encrypted. Returning serialized ServiceEnvelope Feb 11 07:08:36 pi3plus Node-RED[10011]: Outputting payload from decode node Feb 11 07:08:36 pi3plus Node-RED[10011]: Serializing ServiceEnvelope to JSON for output Feb 11 07:08:36 pi3plus Node-RED[10011]: Payload was encrypted. Returning serialized ServiceEnvelope Feb 11 07:08:36 pi3plus Node-RED[10011]: Outputting payload from decode node Feb 11 07:08:36 pi3plus Node-RED[10011]: Serializing ServiceEnvelope to JSON for output Feb 11 07:08:36 pi3plus Node-RED[10011]: Payload was encrypted. Returning serialized ServiceEnvelope Feb 11 07:08:36 pi3plus Node-RED[10011]: Outputting payload from decode node

Respectfully, There no need for this stuff to be logged IMHO.

va24531 commented 4 months ago

Quick and dirty work-around is to modify the node-red 'settings.js' file and change the 'level / console' logging option down to something lower than 'info'. I just switched it 'off' for the time being. Hope this helps others.