Changeset 8480
- Timestamp:
- 04/29/08 22:33:48 (9 months ago)
- Files:
-
- trunk/include/iprt/log.h (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/iprt/log.h
r8274 r8480 139 139 #endif 140 140 141 /** @def LOG_FN_FMT 142 * You can use this to specify you desired way of printing __PRETTY_FUNCTION__ 143 * if you dislike the default one. 144 */ 145 #ifndef LOG_FN_FMT 146 # define LOG_FN_FMT "%Rfn" 147 #endif 141 148 142 149 /** Logger structure. */ … … 535 542 */ 536 543 #define LogTrace() \ 537 LogFlow((">>>>> %s (%d): %s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__))544 LogFlow((">>>>> %s (%d): " LOG_FN_FMT "\n", __FILE__, __LINE__, __PRETTY_FUNCTION__)) 538 545 539 546 /** @def LogTraceMsg … … 555 562 */ 556 563 #define LogFunc(m) \ 557 do { Log(( "%s: ", __PRETTY_FUNCTION__)); Log(m); } while (0)564 do { Log((LOG_FN_FMT ": ", __PRETTY_FUNCTION__)); Log(m); } while (0) 558 565 559 566 /** @def LogThisFunc … … 565 572 */ 566 573 #define LogThisFunc(m) \ 567 do { Log(("{%p} %s: ", this, __PRETTY_FUNCTION__)); Log(m); } while (0)574 do { Log(("{%p} " LOG_FN_FMT ": ", this, __PRETTY_FUNCTION__)); Log(m); } while (0) 568 575 569 576 /** @def LogFlowFunc … … 576 583 */ 577 584 #define LogFlowFunc(m) \ 578 do { LogFlow(( "%s: ", __PRETTY_FUNCTION__)); LogFlow(m); } while (0)585 do { LogFlow((LOG_FN_FMT ": ", __PRETTY_FUNCTION__)); LogFlow(m); } while (0) 579 586 580 587 /** @def LogWarningFunc … … 585 592 */ 586 593 #define LogWarningFunc(m) \ 587 do { Log(( "%s: WARNING! ", __PRETTY_FUNCTION__)); Log(m); } while (0)594 do { Log((LOG_FN_FMT ": WARNING! ", __PRETTY_FUNCTION__)); Log(m); } while (0) 588 595 589 596 /** @def LogFlowThisFunc … … 595 602 */ 596 603 #define LogFlowThisFunc(m) \ 597 do { LogFlow(("{%p} %s: ", this, __PRETTY_FUNCTION__)); LogFlow(m); } while (0)604 do { LogFlow(("{%p} " LOG_FN_FMT ": ", this, __PRETTY_FUNCTION__)); LogFlow(m); } while (0) 598 605 599 606 /** @def LogWarningThisFunc … … 605 612 */ 606 613 #define LogWarningThisFunc(m) \ 607 do { Log(("{%p} %s: WARNING! ", this, __PRETTY_FUNCTION__)); Log(m); } while (0)614 do { Log(("{%p} " LOG_FN_FMT ": WARNING! ", this, __PRETTY_FUNCTION__)); Log(m); } while (0) 608 615 609 616 /** Shortcut to |LogFlowFunc ("ENTER\n")|, marks the beginnig of the function */ … … 781 788 */ 782 789 #define LogRelFunc(a) \ 783 do { LogRel(( "%s: ", __PRETTY_FUNCTION__)); LogRel(a); } while (0)790 do { LogRel((LOG_FN_FMT ": ", __PRETTY_FUNCTION__)); LogRel(a); } while (0) 784 791 785 792 /** @def LogRelThisFunc … … 788 795 */ 789 796 #define LogRelThisFunc(a) \ 790 do { LogRel(("{%p} %s: ", this, __PRETTY_FUNCTION__)); LogRel(a); } while (0)797 do { LogRel(("{%p} " LOG_FN_FMT ": ", this, __PRETTY_FUNCTION__)); LogRel(a); } while (0) 791 798 792 799 /** @def LogRelLelik

