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-at-serial-port.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-at-serial-port.c')
-rw-r--r-- | src/mm-at-serial-port.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mm-at-serial-port.c b/src/mm-at-serial-port.c index 3df8681b..30da3a3b 100644 --- a/src/mm-at-serial-port.c +++ b/src/mm-at-serial-port.c @@ -23,7 +23,7 @@ #include "mm-at-serial-port.h" #include "mm-errors.h" -#include "mm-options.h" +#include "mm-log.h" G_DEFINE_TYPE (MMAtSerialPort, mm_at_serial_port, MM_TYPE_SERIAL_PORT) @@ -273,7 +273,6 @@ debug_log (MMSerialPort *port, const char *prefix, const char *buf, gsize len) { static GString *debug = NULL; const char *s; - GTimeVal tv; if (!debug) debug = g_string_sized_new (256); @@ -296,12 +295,7 @@ debug_log (MMSerialPort *port, const char *prefix, const char *buf, gsize len) } g_string_append_c (debug, '\''); - g_get_current_time (&tv); - g_debug ("<%ld.%ld> (%s): %s", - tv.tv_sec, - tv.tv_usec, - mm_port_get_device (MM_PORT (port)), - debug->str); + mm_dbg ("(%s): %s", mm_port_get_device (MM_PORT (port)), debug->str); g_string_truncate (debug, 0); } |