VirtualBox

Changeset 21699 in vbox


Ignore:
Timestamp:
Jul 17, 2009 2:26:51 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50250
Message:

iprt/log.h: Fixed the LogRel*Func macros.

File:
1 edited

Legend:

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

    r21648 r21699  
    923923#define LogRelFlow(a)      LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_FLOW,     LOG_GROUP, a)
    924924
    925 /** @def LogRelFlowFunc
    926  * Release logging.  Macro to log the execution flow inside C/C++ functions.
    927  *
    928  * Prepends the given log message with the function name followed by
    929  * a semicolon and space.
    930  *
    931  * @param   a   Log message in format <tt>("string\n" [, args])</tt>.
    932  */
    933 # define LogRelFlowFunc(a) \
    934     do { LogRelFlow((LOG_FN_FMT ": ", __PRETTY_FUNCTION__)); LogRelFlow(a); } while (0)
    935 
    936925/** @def LogRelFunc
    937926 * Release logging.  Prepends the given log message with the function name
    938927 * followed by a semicolon and space.
    939928 */
    940 #define LogRelFunc(a) \
     929#ifdef LOG_USE_C99
     930# define LogRelFunc(a) \
     931    _LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_1, LOG_GROUP, LOG_FN_FMT ": %M", __PRETTY_FUNCTION__, _LogRemoveParentheseis a )
     932#else
     933# define LogRelFunc(a) \
    941934    do { LogRel((LOG_FN_FMT ": ", __PRETTY_FUNCTION__)); LogRel(a); } while (0)
     935#endif
    942936
    943937/** @def LogRelThisFunc
     
    945939 * line is additionally prepended with a hex value of |this| pointer.
    946940 */
    947 #define LogRelThisFunc(a) \
     941#ifdef LOG_USE_C99
     942# define LogRelThisFunc(a) \
     943    _LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_LEVEL_1, LOG_GROUP, "{%p} " LOG_FN_FMT ": %M", this, __PRETTY_FUNCTION__, _LogRemoveParentheseis a )
     944#else
     945# define LogRelThisFunc(a) \
    948946    do { LogRel(("{%p} " LOG_FN_FMT ": ", this, __PRETTY_FUNCTION__)); LogRel(a); } while (0)
     947#endif
     948
     949/** @def LogRelFlowFunc
     950 * Release logging.  Macro to log the execution flow inside C/C++ functions.
     951 *
     952 * Prepends the given log message with the function name followed by
     953 * a semicolon and space.
     954 *
     955 * @param   a   Log message in format <tt>("string\n" [, args])</tt>.
     956 */
     957#ifdef LOG_USE_C99
     958# define LogRelFlowFunc(a) \
     959    _LogRelIt(LOG_REL_INSTANCE, RTLOGGRPFLAGS_FLOW, LOG_GROUP, LOG_FN_FMT ": %M", __PRETTY_FUNCTION__, _LogRemoveParentheseis a )
     960#else
     961# define LogRelFlowFunc(a) \
     962    do { LogRelFlow((LOG_FN_FMT ": ", __PRETTY_FUNCTION__)); LogRelFlow(a); } while (0)
     963#endif
    949964
    950965/** @def LogRelLelik
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