Changeset 55980 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- May 20, 2015 5:35:22 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 100489
- Location:
- trunk/src/VBox/Runtime/common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/log/log.cpp
r55436 r55980 2576 2576 2577 2577 /** 2578 * Gets the default logger instance, creating it if necessary. 2579 * 2580 * @returns Pointer to default logger instance. 2581 * @returns NULL if no default logger instance available. 2582 */ 2583 RTDECL(PRTLOGGER) RTLogDefaultInstance(void) 2578 * Common worker for RTLogDefaultInstance and RTLogDefaultInstanceEx. 2579 */ 2580 DECL_FORCE_INLINE(PRTLOGGER) rtLogDefaultInstanceCommon(void) 2584 2581 { 2585 2582 #ifdef IN_RC … … 2609 2606 #endif /* !IN_RC */ 2610 2607 } 2608 2609 2610 RTDECL(PRTLOGGER) RTLogDefaultInstance(void) 2611 { 2612 return rtLogDefaultInstanceCommon(); 2613 } 2611 2614 RT_EXPORT_SYMBOL(RTLogDefaultInstance); 2612 2615 2613 2616 2614 /** 2615 * Gets the default logger instance. 2616 * 2617 * @returns Pointer to default logger instance. 2618 * @returns NULL if no default logger instance available. 2619 */ 2620 RTDECL(PRTLOGGER) RTLogGetDefaultInstance(void) 2617 RTDECL(PRTLOGGER) RTLogDefaultInstanceEx(uint32_t fFlags, uint32_t iGroup) 2618 { 2619 PRTLOGGER pLogger = rtLogDefaultInstanceCommon(); 2620 if (pLogger) 2621 { 2622 if (pLogger->fFlags & RTLOGFLAGS_DISABLED) 2623 pLogger = NULL; 2624 else if ( iGroup != UINT32_MAX 2625 && ( (pLogger->afGroups[iGroup < pLogger->cGroups ? iGroup : 0] & (fFlags | RTLOGGRPFLAGS_ENABLED)) 2626 != (fFlags | RTLOGGRPFLAGS_ENABLED))) 2627 pLogger = NULL; 2628 } 2629 return pLogger; 2630 } 2631 RT_EXPORT_SYMBOL(RTLogDefaultInstanceEx); 2632 2633 2634 /** 2635 * Common worker for RTLogGetDefaultInstance and RTLogGetDefaultInstanceEx. 2636 */ 2637 DECL_FORCE_INLINE(PRTLOGGER) rtLogGetDefaultInstanceCommon(void) 2621 2638 { 2622 2639 #ifdef IN_RC … … 2640 2657 #endif 2641 2658 } 2659 2660 2661 RTDECL(PRTLOGGER) RTLogGetDefaultInstance(void) 2662 { 2663 return rtLogGetDefaultInstanceCommon(); 2664 } 2642 2665 RT_EXPORT_SYMBOL(RTLogGetDefaultInstance); 2666 2667 2668 RTDECL(PRTLOGGER) RTLogGetDefaultInstanceEx(uint32_t fFlags, uint32_t iGroup) 2669 { 2670 PRTLOGGER pLogger = rtLogGetDefaultInstanceCommon(); 2671 if (pLogger) 2672 { 2673 if (pLogger->fFlags & RTLOGFLAGS_DISABLED) 2674 pLogger = NULL; 2675 else if ( iGroup != UINT32_MAX 2676 && ( (pLogger->afGroups[iGroup < pLogger->cGroups ? iGroup : 0] & (fFlags | RTLOGGRPFLAGS_ENABLED)) 2677 != (fFlags | RTLOGGRPFLAGS_ENABLED))) 2678 pLogger = NULL; 2679 } 2680 return pLogger; 2681 } 2682 RT_EXPORT_SYMBOL(RTLogGetDefaultInstanceEx); 2643 2683 2644 2684 -
trunk/src/VBox/Runtime/common/log/logrel.cpp
r48935 r55980 70 70 71 71 72 /** 73 * Gets the default release logger instance. 74 * 75 * @returns Pointer to default release logger instance. 76 * @returns NULL if no default release logger instance available. 77 */ 78 RTDECL(PRTLOGGER) RTLogRelDefaultInstance(void) 72 RTDECL(PRTLOGGER) RTLogRelGetDefaultInstance(void) 79 73 { 80 74 #ifdef IN_RC … … 84 78 #endif /* !IN_RC */ 85 79 } 86 RT_EXPORT_SYMBOL(RTLogRelDefaultInstance); 80 RT_EXPORT_SYMBOL(RTLogRelGetDefaultInstance); 81 82 83 RTDECL(PRTLOGGER) RTLogRelGetDefaultInstanceEx(uint32_t fFlags, uint32_t iGroup) 84 { 85 #ifdef IN_RC 86 PRTLOGGER pLogger = &g_RelLogger; 87 #else /* !IN_RC */ 88 PRTLOGGER pLogger = g_pRelLogger; 89 #endif /* !IN_RC */ 90 if (pLogger) 91 { 92 if (pLogger->fFlags & RTLOGFLAGS_DISABLED) 93 pLogger = NULL; 94 else if ( iGroup != UINT32_MAX 95 && ( (pLogger->afGroups[iGroup < pLogger->cGroups ? iGroup : 0] & (fFlags | RTLOGGRPFLAGS_ENABLED)) 96 != (fFlags | RTLOGGRPFLAGS_ENABLED))) 97 pLogger = NULL; 98 } 99 return pLogger; 100 } 101 RT_EXPORT_SYMBOL(RTLogRelGetDefaultInstanceEx); 87 102 88 103 … … 123 138 if (!pLogger) 124 139 { 125 pLogger = RTLogRel DefaultInstance();140 pLogger = RTLogRelGetDefaultInstance(); 126 141 if (!pLogger) 127 142 return; … … 157 172 RTDECL(bool) RTLogRelSetBuffering(bool fBuffered) 158 173 { 159 PRTLOGGER pLogger = RTLogRel DefaultInstance();174 PRTLOGGER pLogger = RTLogRelGetDefaultInstance(); 160 175 if (pLogger) 161 176 return RTLogSetBuffering(pLogger, fBuffered); -
trunk/src/VBox/Runtime/common/misc/assert.cpp
r48935 r55980 146 146 # endif 147 147 148 PRTLOGGER pLog = RTLogRel DefaultInstance();148 PRTLOGGER pLog = RTLogRelGetDefaultInstance(); 149 149 if (pLog) 150 150 { … … 255 255 # endif 256 256 257 PRTLOGGER pLog = RTLogRel DefaultInstance();257 PRTLOGGER pLog = RTLogRelGetDefaultInstance(); 258 258 if (pLog) 259 259 {
Note:
See TracChangeset
for help on using the changeset viewer.