core: use MM-specific logging methods always instead of the generic GLib ones

This commit is contained in:
Aleksander Morgado
2016-08-15 13:14:47 +02:00
parent 2306a466c8
commit 7fb366c41a
9 changed files with 65 additions and 45 deletions
+20
View File
@@ -17,6 +17,7 @@
#include <string.h>
#include "mm-modem-helpers.h"
#include "mm-log.h"
static void
test_def_chars (void *f, gpointer d)
@@ -361,6 +362,25 @@ test_take_convert_ucs2_bad_ascii2 (void *f, gpointer d)
g_assert (converted == NULL);
}
void
_mm_log (const char *loc,
const char *func,
guint32 level,
const char *fmt,
...)
{
#if defined ENABLE_TEST_MESSAGE_TRACES
/* Dummy log function */
va_list args;
gchar *msg;
va_start (args, fmt);
msg = g_strdup_vprintf (fmt, args);
va_end (args);
g_print ("%s\n", msg);
g_free (msg);
#endif
}
typedef GTestFixtureFunc TCFunc;