File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -280,19 +280,20 @@ int LogPrintStr(const std::string &str)
280
280
{
281
281
int ret = 0 ; // Returns total number of characters written
282
282
static bool fStartedNewLine = true ;
283
+
284
+ string strTimestamped = LogTimestampStr (str, &fStartedNewLine );
285
+
283
286
if (fPrintToConsole )
284
287
{
285
288
// print to console
286
- ret = fwrite (str .data (), 1 , str .size (), stdout);
289
+ ret = fwrite (strTimestamped .data (), 1 , strTimestamped .size (), stdout);
287
290
fflush (stdout);
288
291
}
289
292
else if (fPrintToDebugLog )
290
293
{
291
294
boost::call_once (&DebugPrintInit, debugPrintInitFlag);
292
295
boost::mutex::scoped_lock scoped_lock (*mutexDebugLog);
293
296
294
- string strTimestamped = LogTimestampStr (str, &fStartedNewLine );
295
-
296
297
// buffer if we haven't opened the log yet
297
298
if (fileout == NULL ) {
298
299
assert (vMsgsBeforeOpenLog);
You can’t perform that action at this time.
0 commit comments