[PATCH spice-common] common/log.h: add spice_client_error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To be used to mark client protocol violations, more easily greppable.
---
 common/log.h |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/common/log.h b/common/log.h
index 37c491f..df8a756 100644
--- a/common/log.h
+++ b/common/log.h
@@ -28,6 +28,10 @@ SPICE_BEGIN_DECLS
 #define SPICE_LOG_DOMAIN "Spice"
 #endif
 
+#ifndef SPICE_CLIENT_LOG_DOMAIN
+#define SPICE_CLIENT_LOG_DOMAIN "Spice(client)"
+#endif
+
 #define SPICE_STRINGIFY(x) SPICE_STRINGIFY_ARG (x)
 #define SPICE_STRINGIFY_ARG(x) #x
 
@@ -85,6 +89,13 @@ void spice_log(const char *log_domain,
 } SPICE_STMT_END
 #endif
 
+#ifndef spice_client_error
+#define spice_client_error(format, ...) SPICE_STMT_START {              \
+    spice_log(SPICE_CLIENT_LOG_DOMAIN,SPICE_LOG_LEVEL_ERROR, SPICE_STRLOC, \
+              __FUNCTION__, format, ## __VA_ARGS__);                    \
+} SPICE_STMT_END
+#endif
+
 #ifndef spice_debug
 #define spice_debug(format, ...) SPICE_STMT_START {                     \
     spice_log(SPICE_LOG_DOMAIN, SPICE_LOG_LEVEL_DEBUG, SPICE_STRLOC, __FUNCTION__, format, ## __VA_ARGS__); \
-- 
1.7.10.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]