How to disable cell debugging information over serial

Is it possible to disable the cellular signal debugging information over serial? I don’t know when/how it got started, but it is quite obnoxious…

Ex.

It depends how you initialise your SerialLogHandler.
If you don’t filter for anything in particular (e.g. app) then you’ll just get all the output.

See how it’s done here
https://docs.particle.io/reference/firmware/photon/#logging-categories

Is there a master list of the default logging categories? Because I’ve set all of the ones I can find to LOG_LEVEL_NONE and am still seeing the same output…also of note is the output doesn’t have the prefixed category, thus I can’t tell which one to turn off!

What logging enable commands are you using? And what system firmware version?

That looks like the old style system logging, not the modern logging, and it shouldn’t be turned on by default unless you have a debug enabled system firmware version built with the local gcc-arm toolchain.

This is on 0.7.0 built through Dev. Commands are:

SerialLogHandler logHandler(LOG_LEVEL_TRACE, {
  { "app", LOG_LEVEL_NONE },
  { "app.network", LOG_LEVEL_NONE },
  { "comm.sparkprotocol", LOG_LEVEL_NONE },
  { "comm.sparkprotocol.handshake", LOG_LEVEL_NONE },
  { "comm.protocol", LOG_LEVEL_NONE },
  { "comm.coap", LOG_LEVEL_NONE },
  { "comm.dtls", LOG_LEVEL_NONE },
  { "system", LOG_LEVEL_NONE }
});

As I post this, I see that it is probably the first argument (LOG_LEVEL_TRACE); however, I still figured it would have the same format as the other logs…?

IIRC, Particle logging also allows for calls like Log.print() which would result in non-prefixed output.
This becomes particularly handy for logs that can’t be contained in one single statement (e.g. input that’s acquired via multiple callback calls).

I believe the Electron modem tracing is enabled when you set the top level to LOG_LEVEL_TRACE. But it’s based on its own code that predates the modern log handler, which is why the output isn’t prefixed.

In this case, it’s probably best to set the default value to LOG_LEVEL_DEBUG and turn on trace only for any module you want it, like app.

1 Like