mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 15:47:38 +02:00
* Show date in logfile and time in console output.
This commit is contained in:
@@ -82,7 +82,12 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true )
|
|||||||
logfile << "TSQLQUERY: ";
|
logfile << "TSQLQUERY: ";
|
||||||
#endif
|
#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();
|
logfile.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +95,10 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true )
|
|||||||
{
|
{
|
||||||
QMutexLocker lock( &s_mutex );
|
QMutexLocker lock( &s_mutex );
|
||||||
|
|
||||||
cout << msg << endl;
|
cout << QTime::currentTime().toString().toUtf8().data()
|
||||||
|
<< " [" << QString::number( debugLevel ).toUtf8().data() << "]: "
|
||||||
|
<< msg << endl;
|
||||||
|
|
||||||
cout.flush();
|
cout.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user