diff options
author | Dan Williams <dcbw@redhat.com> | 2011-01-23 20:51:48 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-01-23 20:51:48 -0600 |
commit | 16039244bb08cb4f62754c710be2052eaef32549 (patch) | |
tree | 689477732fdaf58c7e5b9f1774cd68519dcd896b /src/mm-modem.c | |
parent | f85b014d843ecb2259e9b2e21f44c24ff8ff5fdf (diff) |
core: rework logging
Make it more flexible, add logging to a file, and absolute and
relative timestamps.
Diffstat (limited to 'src/mm-modem.c')
-rw-r--r-- | src/mm-modem.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/mm-modem.c b/src/mm-modem.c index 3535cded..f8234723 100644 --- a/src/mm-modem.c +++ b/src/mm-modem.c @@ -18,7 +18,7 @@ #include <string.h> #include <dbus/dbus-glib.h> #include "mm-modem.h" -#include "mm-options.h" +#include "mm-log.h" #include "mm-errors.h" #include "mm-callback-info.h" #include "mm-marshal.h" @@ -755,22 +755,10 @@ mm_modem_set_state (MMModem *self, dbus_path = (const char *) g_object_get_data (G_OBJECT (self), DBUS_PATH_TAG); if (dbus_path) { - if (mm_options_debug ()) { - GTimeVal tv; - - g_get_current_time (&tv); - g_debug ("<%ld.%ld> Modem %s: state changed (%s -> %s)", - tv.tv_sec, - tv.tv_usec, - dbus_path, - state_to_string (old_state), - state_to_string (new_state)); - } else { - g_message ("Modem %s: state changed (%s -> %s)", - dbus_path, - state_to_string (old_state), - state_to_string (new_state)); - } + mm_info ("Modem %s: state changed (%s -> %s)", + dbus_path, + state_to_string (old_state), + state_to_string (new_state)); } } } |