VirtualBox

Changeset 12147 in vbox


Ignore:
Timestamp:
Sep 5, 2008 5:10:01 PM (16 years ago)
Author:
vboxsync
Message:

IPRT: added RTLOG_REL_DISABLE and RTLOG_REL_ENABLE for disabling release logging and overriding the disabling respectively.

File:
1 edited

Legend:

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

    r12131 r12147  
    297297    /** The logger instance expands LF to CR/LF. */
    298298    RTLOGFLAGS_USECRLF              = 0x00000010,
    299     /** Append to the log destination where applicable. */ 
     299    /** Append to the log destination where applicable. */
    300300    RTLOGFLAGS_APPEND               = 0x00000020,
    301301    /** Show relative timestamps with PREFIX_TSC and PREFIX_TS */
     
    406406
    407407
     408#ifdef DOXYGEN_RUNNING
     409# define LOG_DISABLED
     410# define LOG_ENABLED
     411# define LOG_ENABLE_FLOW
     412#endif
     413
     414/** @def LOG_DISABLED
     415 * Use this compile time define to disable all logging macros. It can
     416 * be overriden for each of the logging macros by the LOG_ENABLE*
     417 * compile time defines.
     418 */
     419
     420/** @def LOG_ENABLED
     421 * Use this compile time define to enable logging when not in debug mode
     422 * or LOG_DISABLED is set.
     423 * This will enabled Log() only.
     424 */
     425
     426/** @def LOG_ENABLE_FLOW
     427 * Use this compile time define to enable flow logging when not in
     428 * debug mode or LOG_DISABLED is defined.
     429 * This will enable LogFlow() only.
     430 */
     431
    408432/*
    409433 * Determin whether logging is enabled and forcefully normalize the indicators.
     
    767791
    768792
    769 #ifdef DOXYGEN_RUNNING
    770 # define LOG_DISABLED
    771 # define LOG_ENABLED
    772 # define LOG_ENABLE_FLOW
    773 #endif
    774 
    775 /** @def LOG_DISABLED
    776  * Use this compile time define to disable all logging macros. It can
    777  * be overriden for each of the logging macros by the LOG_ENABLE*
    778  * compile time defines.
    779  */
    780 
    781 /** @def LOG_ENABLED
    782  * Use this compile time define to enable logging when not in debug mode
    783  * or LOG_DISABLED is set.
    784  * This will enabled Log() only.
    785  */
    786 
    787 /** @def LOG_ENABLE_FLOW
    788  * Use this compile time define to enable flow logging when not in
    789  * debug mode or LOG_DISABLED is defined.
    790  * This will enable LogFlow() only.
    791  */
    792 
    793793
    794794
     
    797797 */
    798798
     799#ifdef DOXYGEN_RUNNING
     800# define RTLOG_REL_DISABLED
     801# define RTLOG_REL_ENABLED
     802#endif
     803
     804/** @def RTLOG_REL_DISABLED
     805 * Use this compile time define to disable all release logging
     806 * macros.
     807 */
     808
     809/** @def RTLOG_REL_ENABLED
     810 * Use this compile time define to override RTLOG_REL_DISABLE.
     811 */
     812
     813/*
     814 * Determin whether release logging is enabled and forcefully normalize the indicators.
     815 */
     816#if !defined(RTLOG_REL_DISABLED) || defined(RTLOG_REL_ENABLED)
     817# undef  RTLOG_REL_DISABLED
     818# undef  RTLOG_REL_ENABLED
     819# define RTLOG_REL_ENABLED
     820#else
     821# undef  RTLOG_REL_ENABLED
     822# undef  RTLOG_REL_DISABLED
     823# define RTLOG_REL_DISABLED
     824#endif
     825
     826
    799827/** @def LogIt
    800828 * Write to specific logger if group enabled.
    801829 */
    802 #ifndef IN_RING0 /* causes problems in ring 0; do not enable before tracking this down (see 3137 & 3144) */
     830#ifdef RTLOG_REL_ENABLED
    803831# if defined(LOG_USE_C99)
    804832#  define _LogRelRemoveParentheseis(...)                __VA_ARGS__
     
    826854  } while (0)
    827855# endif
    828 #else
    829 # define LogRelIt(pvInst, fFlags, iGroup, fmtargs)         do { } while (0)
     856#else   /* !RTLOG_REL_ENABLED */
     857# define LogRelIt(pvInst, fFlags, iGroup, fmtargs)      do { } while (0)
    830858# if defined(LOG_USE_C99)
    831859#  define _LogRelRemoveParentheseis(...)                __VA_ARGS__
    832 #  define _LogRelIt(pvInst, fFlags, iGroup, ...)           do { } while (0)
     860#  define _LogRelIt(pvInst, fFlags, iGroup, ...)        do { } while (0)
    833861# endif
    834 #endif
     862#endif  /* !RTLOG_REL_ENABLED */
     863
    835864
    836865/** @def LogRel
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