Changeset 8962
- Timestamp:
- 05/20/08 16:51:43 (8 months ago)
- Files:
-
- trunk/include/iprt/log.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/iprt/log.h
r8957 r8962 431 431 #ifdef LOG_ENABLED 432 432 # if defined(LOG_USE_C99) 433 # define _LogRemoveParentheseis(...) __VA_ARGS__ 434 # define _LogIt(pvInst, fFlags, iGroup, ...) RTLogLoggerEx((PRTLOGGER)pvInst, fFlags, iGroup, __VA_ARGS__) 435 # define LogIt(pvInst, fFlags, iGroup, fmtargs) _LogIt(pvInst, fFlags, iGroup, _LogRemoveParentheseis fmtargs) 433 # define _LogRemoveParentheseis(...) __VA_ARGS__ 434 # define _LogIt(pvInst, fFlags, iGroup, ...) RTLogLoggerEx((PRTLOGGER)pvInst, fFlags, iGroup, __VA_ARGS__) 435 # define LogIt(pvInst, fFlags, iGroup, fmtargs) _LogIt(pvInst, fFlags, iGroup, _LogRemoveParentheseis fmtargs) 436 # define _LogItAlways(pvInst, fFlags, iGroup, ...) RTLogLoggerEx((PRTLOGGER)pvInst, fFlags, ~0U, __VA_ARGS__) 437 # define LogItAlways(pvInst, fFlags, iGroup, fmtargs) _LogItAlways(pvInst, fFlags, iGroup, _LogRemoveParentheseis fmtargs) 438 /** @todo invent a flag or something for skipping the group check so we can pass iGroup. LogItAlways. */ 436 439 # else 437 440 # define LogIt(pvInst, fFlags, iGroup, fmtargs) \ … … 446 449 } \ 447 450 } while (0) 448 # endif 449 # define LogItAlways(pvInst, fFlags, fmtargs) \ 451 # define LogItAlways(pvInst, fFlags, iGroup, fmtargs) \ 450 452 do \ 451 453 { \ 452 454 register PRTLOGGER LogIt_pLogger = (PRTLOGGER)(pvInst) ? (PRTLOGGER)(pvInst) : RTLogDefaultInstance(); \ 453 455 if (LogIt_pLogger) \ 454 { \455 456 LogIt_pLogger->pfnLogger fmtargs; \ 456 } \457 457 } while (0) 458 # endif 458 459 #else 459 460 # define LogIt(pvInst, fFlags, iGroup, fmtargs) do { } while (0) … … 467 468 468 469 /** @def Log 469 * Level 1 logging that works regardless of the group settings (used for ring-0 assertion logging)470 */ 471 #define LogAlways(a) LogItAlways(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_1, a)470 * Level 1 logging that works regardless of the group settings. 471 */ 472 #define LogAlways(a) LogItAlways(LOG_INSTANCE, RTLOGGRPFLAGS_LEVEL_1, LOG_GROUP, a) 472 473 473 474 /** @def Log

