mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 08:03: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;
|
p = results;
|
||||||
bool ignoreTruncation = false;
|
bool ignoreTruncation = false;
|
||||||
|
bool dirty = false;
|
||||||
noData = true;
|
noData = true;
|
||||||
|
|
||||||
while (*p != isc_info_end)
|
while (*p != isc_info_end)
|
||||||
@ -273,6 +274,7 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
|
|||||||
fprintf(stdout, "%s", p);
|
fprintf(stdout, "%s", p);
|
||||||
p[l] = ch;
|
p[l] = ch;
|
||||||
p += l;
|
p += l;
|
||||||
|
dirty = true;
|
||||||
}
|
}
|
||||||
noData = (l == 0);
|
noData = (l == 0);
|
||||||
}
|
}
|
||||||
@ -285,6 +287,11 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
|
|||||||
|
|
||||||
case isc_info_svc_timeout:
|
case isc_info_svc_timeout:
|
||||||
noData = false;
|
noData = false;
|
||||||
|
if (dirty)
|
||||||
|
{
|
||||||
|
fflush(stdout);
|
||||||
|
dirty = false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user