MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / OpenDebugLog

Function OpenDebugLog

src/util.cpp:204–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204void OpenDebugLog()
205{
206 boost::call_once(&DebugPrintInit, debugPrintInitFlag);
207 boost::mutex::scoped_lock scoped_lock(*mutexDebugLog);
208
209 assert(fileout == NULL);
210 assert(vMsgsBeforeOpenLog);
211 boost::filesystem::path pathDebug = GetDataDir() / "debug.log";
212 fileout = fopen(pathDebug.string().c_str(), "a");
213 if (fileout) setbuf(fileout, NULL); // unbuffered
214
215 // dump buffered messages from before we opened the log
216 while (!vMsgsBeforeOpenLog->empty()) {
217 FileWriteStr(vMsgsBeforeOpenLog->front(), fileout);
218 vMsgsBeforeOpenLog->pop_front();
219 }
220
221 delete vMsgsBeforeOpenLog;
222 vMsgsBeforeOpenLog = NULL;
223}
224
225bool LogAcceptCategory(const char* category)
226{

Callers 1

AppInit2Function · 0.85

Calls 2

FileWriteStrFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected