1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 22:26:32 +02:00

* Show date in logfile and time in console output.

This commit is contained in:
Christian Muehlhaeuser
2013-05-06 06:00:31 +02:00
parent 039f87d8ef
commit 9bc8dbb792

View File

@@ -82,7 +82,12 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true )
logfile << "TSQLQUERY: ";
#endif
logfile << QTime::currentTime().toString().toLatin1().data() << " [" << QString::number( debugLevel ).toLatin1().data() << "]: " << msg << endl;
logfile << QDate::currentDate().toString().toUtf8().data()
<< " - "
<< QTime::currentTime().toString().toUtf8().data()
<< " [" << QString::number( debugLevel ).toUtf8().data() << "]: "
<< msg << endl;
logfile.flush();
}
@@ -90,7 +95,10 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true )
{
QMutexLocker lock( &s_mutex );
cout << msg << endl;
cout << QTime::currentTime().toString().toUtf8().data()
<< " [" << QString::number( debugLevel ).toUtf8().data() << "]: "
<< msg << endl;
cout.flush();
}
}