Changeset 55980 in vbox for trunk/src/VBox/Runtime/common/log/log.cpp
- Timestamp:
- May 20, 2015 5:35:22 PM (10 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.