mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-15 20:50:41 +02:00
Print a log message if we fail to shrink the debug log file
This commit is contained in:
parent
29c9bdcc14
commit
20ce5af4c6
@ -255,6 +255,7 @@ void BCLog::Logger::ShrinkDebugFile()
|
|||||||
// Restart the file with some of the end
|
// Restart the file with some of the end
|
||||||
std::vector<char> vch(RECENT_DEBUG_HISTORY_SIZE, 0);
|
std::vector<char> vch(RECENT_DEBUG_HISTORY_SIZE, 0);
|
||||||
if (fseek(file, -((long)vch.size()), SEEK_END)) {
|
if (fseek(file, -((long)vch.size()), SEEK_END)) {
|
||||||
|
LogPrintf("Failed to shrink debug log file: fseek(...) failed\n");
|
||||||
fclose(file);
|
fclose(file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user