VirtualBox

Changeset 8953 in vbox for trunk/include/iprt/log.h


Ignore:
Timestamp:
May 20, 2008 1:55:09 PM (17 years ago)
Author:
vboxsync
Message:

Ring-0 assertions are now always printed to the debug log.
Introduced LogAlways for this purpose.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/log.h

    r8663 r8953  
    446446        } \
    447447    } while (0)
     448#  define LogItAlways(pvInst, fFlags, fmtargs) \
     449    do \
     450    { \
     451        register PRTLOGGER LogIt_pLogger = (PRTLOGGER)(pvInst) ? (PRTLOGGER)(pvInst) : RTLogDefaultInstance(); \
     452        if (LogIt_pLogger) \
     453        { \
     454            LogIt_pLogger->pfnLogger fmtargs; \
     455        } \
     456    } while (0)
    448457# endif
    449458#else
    450459# define LogIt(pvInst, fFlags, iGroup, fmtargs)     do { } while (0)
     460# define LogItAlways(pvInst, fFlags, fmtargs)       do { } while (0)
    451461# if defined(LOG_USE_C99)
    452462#  define _LogRemoveParentheseis(...)               __VA_ARGS__
     
    455465#endif
    456466
     467
     468/** @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)
    457472
    458473/** @def Log
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette