- Timestamp:
- Sep 9, 2010 1:43:02 PM (14 years ago)
- Location:
- trunk/src/VBox/Runtime/common/log
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/log/log.cpp
r30965 r32355 1430 1430 } 1431 1431 RT_EXPORT_SYMBOL(RTLogFlags); 1432 1433 1434 /** 1435 * Changes the buffering setting of the specified logger. 1436 * 1437 * This can be used for optimizing longish logging sequences. 1438 * 1439 * @returns The old state. 1440 * @param pLogger The logger instance (NULL is an alias for the 1441 * default logger). 1442 * @param fBuffered The new state. 1443 */ 1444 RTDECL(bool) RTLogSetBuffering(PRTLOGGER pLogger, bool fBuffered) 1445 { 1446 bool fOld; 1447 1448 /* 1449 * Resolve the logger instance. 1450 */ 1451 if (!pLogger) 1452 { 1453 pLogger = RTLogDefaultInstance(); 1454 if (!pLogger) 1455 return false; 1456 } 1457 1458 rtlogLock(pLogger); 1459 fOld = !!(pLogger->fFlags & RTLOGFLAGS_BUFFERED); 1460 if (fBuffered) 1461 pLogger->fFlags |= RTLOGFLAGS_BUFFERED; 1462 else 1463 pLogger->fFlags &= ~RTLOGFLAGS_BUFFERED; 1464 rtlogUnlock(pLogger); 1465 1466 return fOld; 1467 } 1468 RT_EXPORT_SYMBOL(RTLogSetBuffering); 1469 1432 1470 1433 1471 -
trunk/src/VBox/Runtime/common/log/logrel.cpp
r30111 r32355 146 146 RT_EXPORT_SYMBOL(RTLogRelPrintfV); 147 147 148 149 /** 150 * Changes the buffering setting of the default release logger. 151 * 152 * This can be used for optimizing longish logging sequences. 153 * 154 * @returns The old state. 155 * @param fBuffered The new state. 156 */ 157 RTDECL(bool) RTLogRelSetBuffering(bool fBuffered) 158 { 159 PRTLOGGER pLogger = RTLogRelDefaultInstance(); 160 if (pLogger) 161 return RTLogSetBuffering(pLogger, fBuffered); 162 return false; 163 } 164 RT_EXPORT_SYMBOL(RTLogRelSetBuffering); 165
Note:
See TracChangeset
for help on using the changeset viewer.