log: force using the object logging API
Unless the generic API is explicitly allowed, as in the main.c source file.
This commit is contained in:
@@ -26,8 +26,9 @@
|
||||
|
||||
#include "ModemManager.h"
|
||||
|
||||
#include "mm-base-manager.h"
|
||||
#define MM_LOG_NO_OBJECT
|
||||
#include "mm-log.h"
|
||||
#include "mm-base-manager.h"
|
||||
#include "mm-context.h"
|
||||
|
||||
#if defined WITH_SYSTEMD_SUSPEND_RESUME
|
||||
|
@@ -36,10 +36,14 @@ typedef enum {
|
||||
#define mm_obj_info(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_INFO, ## __VA_ARGS__ )
|
||||
#define mm_obj_dbg(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_DEBUG, ## __VA_ARGS__ )
|
||||
|
||||
/* only allow using non-object logging API if explicitly requested
|
||||
* (e.g. in the main daemon source) */
|
||||
#if defined MM_LOG_NO_OBJECT
|
||||
# define mm_err(...) mm_obj_err (NULL, ## __VA_ARGS__ )
|
||||
# define mm_warn(...) mm_obj_warn (NULL, ## __VA_ARGS__ )
|
||||
# define mm_info(...) mm_obj_info (NULL, ## __VA_ARGS__ )
|
||||
# define mm_dbg(...) mm_obj_dbg (NULL, ## __VA_ARGS__ )
|
||||
#endif
|
||||
|
||||
void _mm_log (gpointer obj,
|
||||
const gchar *module,
|
||||
|
Reference in New Issue
Block a user