[Spice-devel] [spice-common PATCH v2 02/17] log: include message log level for parity with glib
Victor Toso
victortoso at redhat.com
Fri Jan 8 00:51:32 PST 2016
---
common/log.c | 1 +
common/log.h | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/common/log.c b/common/log.c
index 7d45623..6dd0436 100644
--- a/common/log.c
+++ b/common/log.c
@@ -47,6 +47,7 @@ static GLogLevelFlags spice_log_level_to_glib(SpiceLogLevel level)
[ SPICE_LOG_LEVEL_ERROR ] = G_LOG_LEVEL_ERROR,
[ SPICE_LOG_LEVEL_CRITICAL ] = G_LOG_LEVEL_CRITICAL,
[ SPICE_LOG_LEVEL_WARNING ] = G_LOG_LEVEL_WARNING,
+ [ SPICE_LOG_LEVEL_MESSAGE ] = G_LOG_LEVEL_MESSAGE,
[ SPICE_LOG_LEVEL_INFO ] = G_LOG_LEVEL_INFO,
[ SPICE_LOG_LEVEL_DEBUG ] = G_LOG_LEVEL_DEBUG,
};
diff --git a/common/log.h b/common/log.h
index 8520b42..238df82 100644
--- a/common/log.h
+++ b/common/log.h
@@ -36,6 +36,7 @@ typedef enum {
SPICE_LOG_LEVEL_ERROR,
SPICE_LOG_LEVEL_CRITICAL,
SPICE_LOG_LEVEL_WARNING,
+ SPICE_LOG_LEVEL_MESSAGE,
SPICE_LOG_LEVEL_INFO,
SPICE_LOG_LEVEL_DEBUG,
} SpiceLogLevel;
@@ -88,6 +89,9 @@ void spice_log(const char *log_domain,
#define spice_warning(format, ...) \
SPICE_LOG(SPICE_LOG_LEVEL_WARNING, format, ## __VA_ARGS__)
+#define spice_message(format, ...) \
+ SPICE_LOG(SPICE_LOG_LEVEL_MESSAGE, format, ## __VA_ARGS__)
+
#define spice_critical(format, ...) \
SPICE_LOG(SPICE_LOG_LEVEL_CRITICAL, format, ## __VA_ARGS__)
--
2.5.0
More information about the Spice-devel
mailing list