From: VMware, Inc <> Date: Tue, 26 Apr 2011 21:25:56 +0000 (-0700) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2011.04.25-402641~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0a55f201172e8d60287d36b73d67a95c18d8ac5;p=thirdparty%2Fopen-vm-tools.git Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/include/log.h b/open-vm-tools/lib/include/log.h index b6704ba68..5e0bd948d 100644 --- a/open-vm-tools/lib/include/log.h +++ b/open-vm-tools/lib/include/log.h @@ -35,23 +35,24 @@ */ #define VMW_LOG_BASE 100 -#define VMW_LOG_PANIC VMW_LOG_BASE + 0 // highest priority -#define VMW_LOG_ERROR VMW_LOG_BASE + 1 -#define VMW_LOG_WARNING VMW_LOG_BASE + 2 // <= goes to stderr by default -#define VMW_LOG_INFO VMW_LOG_BASE + 3 // <= goes to log by default -#define VMW_LOG_VERBOSE VMW_LOG_BASE + 4 -#define VMW_LOG_TRIVIA VMW_LOG_BASE + 5 -#define VMW_LOG_DEBUG_00 VMW_LOG_BASE + 6 // noisiest level of debugging -#define VMW_LOG_DEBUG_01 VMW_LOG_BASE + 7 -#define VMW_LOG_DEBUG_02 VMW_LOG_BASE + 8 -#define VMW_LOG_DEBUG_03 VMW_LOG_BASE + 9 -#define VMW_LOG_DEBUG_04 VMW_LOG_BASE + 10 -#define VMW_LOG_DEBUG_05 VMW_LOG_BASE + 11 -#define VMW_LOG_DEBUG_06 VMW_LOG_BASE + 12 -#define VMW_LOG_DEBUG_07 VMW_LOG_BASE + 13 -#define VMW_LOG_DEBUG_08 VMW_LOG_BASE + 14 -#define VMW_LOG_DEBUG_09 VMW_LOG_BASE + 15 -#define VMW_LOG_DEBUG_10 VMW_LOG_BASE + 16 // lowest priority; least noisy +#define VMW_LOG_PANIC VMW_LOG_BASE + 0 // highest priority +#define VMW_LOG_ERROR VMW_LOG_BASE + 5 +#define VMW_LOG_WARNING VMW_LOG_BASE + 10 // <= goes to stderr by default +#define VMW_LOG_AUDIT VMW_LOG_BASE + 15 // *ALWAYS* output to the log +#define VMW_LOG_INFO VMW_LOG_BASE + 20 // <= goes to log by default +#define VMW_LOG_VERBOSE VMW_LOG_BASE + 25 +#define VMW_LOG_TRIVIA VMW_LOG_BASE + 30 +#define VMW_LOG_DEBUG_00 VMW_LOG_BASE + 35 // noisiest level of debugging +#define VMW_LOG_DEBUG_01 VMW_LOG_DEBUG_00 + 1 +#define VMW_LOG_DEBUG_02 VMW_LOG_DEBUG_00 + 2 +#define VMW_LOG_DEBUG_03 VMW_LOG_DEBUG_00 + 3 +#define VMW_LOG_DEBUG_04 VMW_LOG_DEBUG_00 + 4 +#define VMW_LOG_DEBUG_05 VMW_LOG_DEBUG_00 + 5 +#define VMW_LOG_DEBUG_06 VMW_LOG_DEBUG_00 + 6 +#define VMW_LOG_DEBUG_07 VMW_LOG_DEBUG_00 + 7 +#define VMW_LOG_DEBUG_08 VMW_LOG_DEBUG_00 + 8 +#define VMW_LOG_DEBUG_09 VMW_LOG_DEBUG_00 + 9 +#define VMW_LOG_DEBUG_10 VMW_LOG_DEBUG_00 + 10 // lowest priority; least noisy void LogVNoRoute(int rawLevel, @@ -106,6 +107,18 @@ Log_Panic(const char *fmt, } +static INLINE void PRINTF_DECL(1, 2) +Log_Audit(const char *fmt, + ...) +{ + va_list ap; + + va_start(ap, fmt); + LogV(VMW_LOG_AUDIT, fmt, ap); + va_end(ap); +} + + static INLINE void PRINTF_DECL(1, 2) Log_Error(const char *fmt, ...)