- Timestamp:
- Sep 12, 2007 12:06:50 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestLog.h
r4071 r4731 20 20 #define __VBOXGUESTLOG__H 21 21 22 #if defined(RT_OS_LINUX) 23 24 /* Since I don't know the background for the stuff below, I prefer not to change 25 it. I don't need it or want it for backdoor logging inside the Linux 26 Guest Additions kernel modules though. */ 27 # include <VBox/log.h> 28 # define LogRelPrint(a) \ 29 do { \ 30 RTLogWriteUser (a, strlen(a)); \ 31 } while (0) 32 33 # define LogRelPrintQuote(a) \ 34 do { \ 35 LogRelPrint (#a); \ 36 } while (0) 37 38 # define LogRelPrintFunc(a) \ 39 do { \ 40 LogRelPrint (__PRETTY_FUNCTION__); \ 41 LogRelPrint (": "); \ 42 LogRelPrint (a); \ 43 } while (0) 44 45 # define LogFunc(a) \ 46 do { \ 47 Log(("%s: ", __PRETTY_FUNCTION__)); \ 48 Log(a); \ 49 } while (0) 50 51 #else /* RT_OS_LINUX not defined */ 22 52 /* Save LOG_ENABLED state, because "VBox/rt/log.h" 23 53 * may undefine it for IN_RING0 code. 24 54 */ 25 # if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)26 # define __LOG_ENABLED_SAVED__27 # endif55 # if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED) 56 # define __LOG_ENABLED_SAVED__ 57 # endif 28 58 29 #if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED) 30 # ifdef VBOX_GUEST 31 # include <VBox/log.h> 32 # undef Log 33 # define Log(a) RTLogBackdoorPrintf a 59 # if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED) 60 # ifdef VBOX_GUEST 61 # include <VBox/log.h> 62 # undef Log 63 # define Log(a) RTLogBackdoorPrintf a 64 # else 65 # define Log(a) DbgPrint a 66 # endif 34 67 # else 35 # define Log(a) DbgPrint a68 # define Log(a) 36 69 # endif 37 #else38 # define Log(a)39 #endif40 70 41 #ifdef __LOG_ENABLED_SAVED__ 42 # define LOG_ENABLED 43 # undef __LOG_ENABLED_SAVED__ 44 #endif 71 # ifdef __LOG_ENABLED_SAVED__ 72 # define LOG_ENABLED 73 # undef __LOG_ENABLED_SAVED__ 74 # endif 75 76 #endif /* RT_OS_LINUX not defined */ 45 77 46 78 #endif /* __VBOXGUESTLOG__H */
Note:
See TracChangeset
for help on using the changeset viewer.