|
|
@ -295,18 +295,20 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const int BUFSIZE = 4096;
|
|
|
|
const int BUF_SIZE = 4096;
|
|
|
|
char buf[BUFSIZE];
|
|
|
|
const int BUF_PID_SIZE = 20;
|
|
|
|
if ( !kDebug_data->aAreaName.isEmpty() ) {
|
|
|
|
char buf[BUF_SIZE];
|
|
|
|
strlcpy( buf, TQDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] [").ascii(), BUFSIZE );
|
|
|
|
char buf_pid[BUF_PID_SIZE];
|
|
|
|
strlcat( buf, kDebug_data->aAreaName.data(), BUFSIZE );
|
|
|
|
strlcpy(buf, TQDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] ").ascii(), BUF_SIZE);
|
|
|
|
strlcat( buf, "] ", BUFSIZE );
|
|
|
|
if (!kDebug_data->aAreaName.isEmpty())
|
|
|
|
strlcat( buf, data, BUFSIZE );
|
|
|
|
{
|
|
|
|
}
|
|
|
|
strlcat( buf, "[", BUF_SIZE );
|
|
|
|
else {
|
|
|
|
strlcat( buf, kDebug_data->aAreaName.data(), BUF_SIZE );
|
|
|
|
strlcpy( buf, TQDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] ").ascii(), BUFSIZE );
|
|
|
|
strlcat( buf, "] ", BUF_SIZE );
|
|
|
|
strlcat( buf, data, BUFSIZE );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
snprintf(buf_pid, BUF_PID_SIZE, "[%d] ", getpid());
|
|
|
|
|
|
|
|
strlcat(buf, buf_pid, BUF_SIZE);
|
|
|
|
|
|
|
|
strlcat(buf, data, BUF_SIZE);
|
|
|
|
|
|
|
|
|
|
|
|
// Output
|
|
|
|
// Output
|
|
|
|
switch( nOutput )
|
|
|
|
switch( nOutput )
|
|
|
|