Changeset 32355 in vbox
- Timestamp:
- Sep 9, 2010 1:43:02 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/log.h
r31399 r32355 1181 1181 RTDECL(void) RTLogRelPrintfV(const char *pszFormat, va_list args); 1182 1182 1183 /** 1184 * Changes the buffering setting of the default release logger. 1185 * 1186 * This can be used for optimizing longish logging sequences. 1187 * 1188 * @returns The old state. 1189 * @param fBuffered The new state. 1190 */ 1191 RTDECL(bool) RTLogRelSetBuffering(bool fBuffered); 1183 1192 1184 1193 /** @} */ … … 1542 1551 */ 1543 1552 RTDECL(int) RTLogFlags(PRTLOGGER pLogger, const char *pszVar); 1553 1554 /** 1555 * Changes the buffering setting of the specified logger. 1556 * 1557 * This can be used for optimizing longish logging sequences. 1558 * 1559 * @returns The old state. 1560 * @param pLogger The logger instance (NULL is an alias for the 1561 * default logger). 1562 * @param fBuffered The new state. 1563 */ 1564 RTDECL(bool) RTLogSetBuffering(PRTLOGGER pLogger, bool fBuffered); 1544 1565 1545 1566 #ifndef IN_RC -
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.