From: VMware, Inc <> Date: Tue, 24 Aug 2010 18:10:34 +0000 (-0700) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2010.08.24-292196~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d18ce7930b78b4e70e91be4b030ba92dc3aa378;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 c83c70b36..d9aa1457e 100644 --- a/open-vm-tools/lib/include/log.h +++ b/open-vm-tools/lib/include/log.h @@ -26,6 +26,23 @@ #include +/* + * The log levels are taken from POSIXen syslog. We hijack their values + * on POSIXen and provide equivalent defines on all other platforms. + */ + +#if defined(_WIN32) +# include + +# define LOG_INFO EVENTLOG_INFORMATION_TYPE +# define LOG_WARNING EVENTLOG_WARNING_TYPE +# define LOG_ERR EVENTLOG_ERROR_TYPE +#else +# if !defined(VMM) +# include +# endif +#endif + typedef void (LogBasicFunc)(const char *fmt, va_list args); @@ -53,6 +70,8 @@ typedef struct SysLogger systemLoggerUse; // System logger options const char *systemLoggerID; // Identifier for system logger + + Bool stderrWarnings; // warning also to stderr? } LogInitParams; void Log_GetInitDefaults(const char *fileName, @@ -116,6 +135,14 @@ void LogV(const char *fmt, void WarningV(const char *fmt, va_list args); +void Log_Level(int level, + const char *fmt, + ...); + +void Log_LevelV(int level, + const char *fmt, + va_list args); + /* Logging that uses the custom guest throttling configuration. */ void GuestLog_Init(void); void GuestLog_Log(const char *fmt, ...) PRINTF_DECL(1, 2);