aboutsummaryrefslogtreecommitdiff
path: root/src/mm-log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-log.h')
-rw-r--r--src/mm-log.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/mm-log.h b/src/mm-log.h
index 4102c3b6..b0dab7ae 100644
--- a/src/mm-log.h
+++ b/src/mm-log.h
@@ -50,6 +50,12 @@ typedef enum {
# define mm_dbg(...) mm_obj_dbg (NULL, ## __VA_ARGS__ )
#endif
+#define mm_log_err_enabled() mm_log_check_level_enabled (MM_LOG_LEVEL_ERR)
+#define mm_log_warn_enabled() mm_log_check_level_enabled (MM_LOG_LEVEL_WARN)
+#define mm_log_msg_enabled() mm_log_check_level_enabled (MM_LOG_LEVEL_MSG)
+#define mm_log_info_enabled() mm_log_check_level_enabled (MM_LOG_LEVEL_INFO)
+#define mm_log_debug_enabled() mm_log_check_level_enabled (MM_LOG_LEVEL_DEBUG)
+
void _mm_log (gpointer obj,
const gchar *module,
const gchar *loc,
@@ -58,16 +64,17 @@ void _mm_log (gpointer obj,
const gchar *fmt,
...) __attribute__((__format__ (__printf__, 6, 7)));
-gboolean mm_log_set_level (const gchar *level,
- GError **error);
-gboolean mm_log_setup (const gchar *level,
- const gchar *log_file,
- gboolean log_journal,
- gboolean show_ts,
- gboolean rel_ts,
- gboolean show_personal_info,
- GError **error);
-void mm_log_shutdown (void);
+gboolean mm_log_set_level (const gchar *level,
+ GError **error);
+gboolean mm_log_setup (const gchar *level,
+ const gchar *log_file,
+ gboolean log_journal,
+ gboolean show_ts,
+ gboolean rel_ts,
+ gboolean show_personal_info,
+ GError **error);
+gboolean mm_log_check_level_enabled (MMLogLevel level);
+void mm_log_shutdown (void);
/* Helper used when printing a string that may be personal
* info. Depending on the settings, we may print it as-is,