Age | Commit message (Collapse) | Author |
|
|
|
We need this when building printable representations of helper types
like the MMBearerProperties object.
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
Unless the generic API is explicitly allowed, as in the main.c source
file.
|
|
|
|
|
|
So that we can provide the specific object id in every log associated
to a given object.
|
|
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.
|
|
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.
|
|
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"
|
|
|
|
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.
|
|
If the modem is started with --log-level=DEBUG, they will not be shown.
|
|
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>
|
|
Make it more flexible, add logging to a file, and absolute and
relative timestamps.
|