aboutsummaryrefslogtreecommitdiff
path: root/src/mm-log.h
AgeCommit message (Collapse)Author
2023-01-03log: avoid redefining MM_MODULE_NAMEAleksander Morgado
2022-11-04log: allow querying whether personal info should be shown or notAleksander Morgado
We need this when building printable representations of helper types like the MMBearerProperties object.
2022-11-04log: new methods to check if a given logging level is enabledAleksander Morgado
There are certain cases where we perform a lot of data processing just for logging purposes. Having methods that let us know whether a given log level will be printed before doing all that data processing is useful.
2022-11-04log: new mm_obj_log() that allows specifying level explicitlyAleksander Morgado
2022-11-04log: new helper to allow printing or hiding personal infoAleksander Morgado
2022-11-04core,log: new 'MSG' log level between 'INFO' and 'WARN'Aleksander Morgado
We're bumping the current "INFO" level messages to the new "MSG" level, also making the new level the default. The old "INFO" level will be used to setup an intermediate level of logging which is not as verbose as "DEBUG" but still provides some capabilities to analyze the behavior of a modem.
2022-08-05core,log: minor coding style changesAleksander Morgado
2022-04-20mm-log: hiding personal info while loggingsom
During mm logging, some of the information like simIccId, Telephone numbers need to be hidden from displaying in the logs to protect some of the user information. Implemented for MBIM requiring libmbim 1.27.6, which is the development version that includes the needed API.
2020-04-09log: force using the object logging APIAleksander Morgado
Unless the generic API is explicitly allowed, as in the main.c source file.
2020-04-08log: define per-module logging for shared utils and pluginsAleksander Morgado
2020-04-08log: common logging method definition for all testers and helpersAleksander Morgado
2020-04-08log: new object logging supportAleksander Morgado
So that we can provide the specific object id in every log associated to a given object.
2017-06-21log: Add support for journal loggingTorsten Hilbrich
This logging is available if the software was build with the configure option --with-systemd-journal. It will be enabled by default if libsystemd is found. The runtime parameter --log-journal enables to output of log messages to the systemd journal. Please note that the journal priority field has the same value as the syslog level so no conversion is required here.
2017-06-21log: Refactor evaluation of log levelTorsten Hilbrich
Starting with adding a typed enum type for the log level named MMLogLevel. Suggested-By: Aleksander Morgado <aleksander@aleksander.es> The level was checked twice in _mm_log. Once at the beginning and again when turning the level into both the syslog priority and some descriptive text which was added to the log level. Removing the check at the second location as it was redundant. Also adding a helper function to turn the MMLogLevel into the syslog equivalent. This will become handy when adding support for systemd journal.
2017-05-29log: remove func loc info unless MM_LOG_FUNC_LOC is definedAleksander Morgado
The user can build the project passing custom CFLAGS to enable the function location information, e.g.: $ ./configure --prefix=/usr CFLAGS="-DMM_LOG_FUNC_LOC"
2014-05-20core: minor coding style fixesBen Chan
2013-02-12core: use g_unix_signal_add() for more reliable Unix signal handlingDan Williams
There were a few problems with MM's existing signal handling, first of which was that calling g_main_loop_quit() from a signal handler only works 50% of the time due to severe restrictions on what you can do from the handler. This caused INT or TERM to sometimes be ignored by MM. Instead, use the glib signal functions which ensure that the handler is run in the right context, where we can do anything we want.
2012-03-16log: only include LOC and method name in debug logs if running with --debugAleksander Morgado
If the modem is started with --log-level=DEBUG, they will not be shown.
2011-06-30Add a DBus interface for setting the log level.Nathan Williams
Lifted almost entirely from similar code in NetworkManager. BUG=chromium-os:15197 TEST='dbus-send --print-reply --system --dest=org.freedesktop.ModemManager /org/freedesktop/ModemManager org.freedesktop.ModemManager.SetLogging string:DEBUG' Also try valid log levels 'ERR', 'WARN', 'INFO', and an invalid log level, such as 'ABCDE'. Change-Id: I2bddcd0319f4966dd293b119f68e7cc1697949b7 Reviewed-on: http://gerrit.chromium.org/gerrit/3134 Tested-by: Nathan J. Williams <njw@chromium.org> Reviewed-by: Eric Shienbrood <ers@chromium.org>
2011-01-23core: rework loggingDan Williams
Make it more flexible, add logging to a file, and absolute and relative timestamps.