Added timestamp to debug backend (kdDebug, kdWarning, ...).

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 0e7f9b8db1)
r14.0.x
Michele Calgaro 6 years ago
parent 882c28f276
commit fe423b35a8
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -294,13 +294,15 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
const int BUFSIZE = 4096;
char buf[BUFSIZE];
if ( !kDebug_data->aAreaName.isEmpty() ) {
strlcpy( buf, kDebug_data->aAreaName.data(), BUFSIZE );
strlcat( buf, ": ", BUFSIZE );
strlcpy( buf, TQDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] [").ascii(), BUFSIZE );
strlcat( buf, kDebug_data->aAreaName.data(), BUFSIZE );
strlcat( buf, "] ", BUFSIZE );
strlcat( buf, data, BUFSIZE );
}
else {
strlcpy( buf, TQDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] ").ascii(), BUFSIZE );
strlcat( buf, data, BUFSIZE );
}
else
strlcpy( buf, data, BUFSIZE );
// Output
switch( nOutput )

Loading…
Cancel
Save