Per-object logging updates

Aleksander Morgado aleksander at aleksander.es
Tue Mar 31 17:27:55 UTC 2020


Hey!

See the following MR:
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/263

It introduces per-object specific logging, so that e.g. all logs
generated by the same modem object are all prefixed with the same
"modemX" string, e.g.:

ModemManager[270221]: <debug> [1585674972.744424] [modem0] enabling
+CCWA call waiting indications in primary port...
ModemManager[270221]: <debug> [1585674972.744456] [modem0/ttyACM0/at]
device open count is 4 (open)
ModemManager[270221]: <debug> [1585674972.744483] [modem0/ttyACM0/at]
device open count is 3 (close)
ModemManager[270221]: <debug> [1585674972.744511] [modem0/ttyACM0/at]
--> 'AT+CCWA=1<CR>'
ModemManager[270221]: <debug> [1585674972.757003] [modem0/ttyACM0/at]
<-- '<CR><LF>OK<CR><LF>'
ModemManager[270221]: <info>  [1585674972.757183] [modem0] state
changed (enabling -> enabled)

This change is extremely useful when analyzing daemon logs on systems
with more than one modem, as a simple grep on the log would allow us
to just grab the logs of one of the devices.

The MR doesn't fully port all the codebase yet, but it already ports
all the main base objects.

Comments welcome!

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list