mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
extra logging
This commit is contained in:
parent
5e3db65846
commit
fbc9ff7601
3 changed files with 9 additions and 4 deletions
|
|
@ -31,13 +31,16 @@ ServerLogger::~ServerLogger()
|
|||
flushBuffer();
|
||||
}
|
||||
|
||||
void ServerLogger::logMessage(QString message)
|
||||
void ServerLogger::logMessage(QString message, ServerSocketInterface *ssi)
|
||||
{
|
||||
if (!logFile)
|
||||
return;
|
||||
|
||||
bufferMutex.lock();
|
||||
buffer.append(QDateTime::currentDateTime().toString() + " " + QString::number((qulonglong) QThread::currentThread(), 16) + " " + message);
|
||||
QString ssiString;
|
||||
if (ssi)
|
||||
ssiString = QString::number((qulonglong) ssi) + " ";
|
||||
buffer.append(QDateTime::currentDateTime().toString() + " " + QString::number((qulonglong) QThread::currentThread(), 16) + " " + ssiString + message);
|
||||
bufferMutex.unlock();
|
||||
|
||||
emit sigFlushBuffer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue