mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:43:03 +01:00
Improvement CORE-3324 : ftracemgr should flush its output from time to time
This commit is contained in:
parent
1633598aa3
commit
914a21e766
@ -252,6 +252,7 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
|
||||
|
||||
p = results;
|
||||
bool ignoreTruncation = false;
|
||||
bool dirty = false;
|
||||
noData = true;
|
||||
|
||||
while (*p != isc_info_end)
|
||||
@ -273,6 +274,7 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
|
||||
fprintf(stdout, "%s", p);
|
||||
p[l] = ch;
|
||||
p += l;
|
||||
dirty = true;
|
||||
}
|
||||
noData = (l == 0);
|
||||
}
|
||||
@ -285,6 +287,11 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
|
||||
|
||||
case isc_info_svc_timeout:
|
||||
noData = false;
|
||||
if (dirty)
|
||||
{
|
||||
fflush(stdout);
|
||||
dirty = false;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user