- Timestamp:
- Aug 29, 2008 11:11:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/log/log.cpp
r11521 r11853 409 409 if (pLogger->fDestFlags & RTLOGDEST_FILE) 410 410 { 411 rc = RTFileOpen(&pLogger->File, pLogger->pszFilename, 412 RTFILE_O_WRITE | RTFILE_O_CREATE_REPLACE | RTFILE_O_DENY_WRITE); 411 if (!(pLogger->fFlags & RTLOGFLAGS_APPEND)) 412 rc = RTFileOpen(&pLogger->File, pLogger->pszFilename, 413 RTFILE_O_WRITE | RTFILE_O_CREATE_REPLACE | RTFILE_O_DENY_WRITE); 414 else 415 { 416 /** @todo RTFILE_O_APPEND. */ 417 rc = RTFileOpen(&pLogger->File, pLogger->pszFilename, 418 RTFILE_O_WRITE | RTFILE_O_OPEN_CREATE | RTFILE_O_DENY_WRITE); 419 if (RT_SUCCESS(rc)) 420 { 421 rc = RTFileSeek(pLogger->File, 0, RTFILE_SEEK_END, NULL); 422 if (RT_FAILURE(rc)) 423 { 424 RTFileClose(pLogger->File); 425 pLogger->File = NIL_RTFILE; 426 } 427 } 428 } 413 429 if (RT_FAILURE(rc) && pszErrorMsg) 414 430 RTStrPrintf(pszErrorMsg, cchErrorMsg, "could not open file '%s'", pLogger->pszFilename); … … 1232 1248 { "usecrlf", sizeof("usecrlf" ) - 1, RTLOGFLAGS_USECRLF, true }, 1233 1249 { "uself", sizeof("uself" ) - 1, RTLOGFLAGS_USECRLF, false }, 1250 { "append", sizeof("append" ) - 1, RTLOGFLAGS_APPEND, false }, 1251 { "overwrite", sizeof("overwrite" ) - 1, RTLOGFLAGS_APPEND, true }, 1234 1252 { "rel", sizeof("rel" ) - 1, RTLOGFLAGS_REL_TS, false }, 1235 1253 { "abs", sizeof("abs" ) - 1, RTLOGFLAGS_REL_TS, true },
Note:
See TracChangeset
for help on using the changeset viewer.