1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

Style fixes in Logger.

This commit is contained in:
Christian Muehlhaeuser
2014-10-22 21:53:27 +02:00
parent 0f4ca7e185
commit 5ab64dc1b6

View File

@@ -83,21 +83,21 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true )
{ {
// Do not use locales anymore in shutdown // Do not use locales anymore in shutdown
logStream << QDate::currentDate().day() << "." logStream << QDate::currentDate().day() << "."
<< QDate::currentDate().month() << "." << QDate::currentDate().month() << "."
<< QDate::currentDate().year() << " - " << QDate::currentDate().year() << " - "
<< QTime::currentTime().hour() << ":" << QTime::currentTime().hour() << ":"
<< QTime::currentTime().minute() << ":" << QTime::currentTime().minute() << ":"
<< QTime::currentTime().second() << QTime::currentTime().second()
<< " [" << QString::number( debugLevel ).toUtf8().data() << "]: " << " [" << QString::number( debugLevel ).toUtf8().data() << "]: "
<< msg << endl; << msg << endl;
} }
else else
{ {
logStream << QDate::currentDate().toString().toUtf8().data() logStream << QDate::currentDate().toString().toUtf8().data()
<< " - " << " - "
<< QTime::currentTime().toString().toUtf8().data() << QTime::currentTime().toString().toUtf8().data()
<< " [" << QString::number( debugLevel ).toUtf8().data() << "]: " << " [" << QString::number( debugLevel ).toUtf8().data() << "]: "
<< msg << endl; << msg << endl;
} }
logStream.flush(); logStream.flush();
@@ -110,16 +110,16 @@ log( const char *msg, unsigned int debugLevel, bool toDisk = true )
if ( shutdownInProgress ) if ( shutdownInProgress )
{ {
wcout << QTime::currentTime().hour() << ":" wcout << QTime::currentTime().hour() << ":"
<< QTime::currentTime().minute() << ":" << QTime::currentTime().minute() << ":"
<< QTime::currentTime().second() << QTime::currentTime().second()
<< " [" << QString::number( debugLevel ).toStdWString().c_str() << "]: " << " [" << QString::number( debugLevel ).toStdWString().c_str() << "]: "
<< msg << endl; << msg << endl;
} }
else else
{ {
wcout << QTime::currentTime().toString().toUtf8().data() wcout << QTime::currentTime().toString().toUtf8().data()
<< " [" << QString::number( debugLevel ).toStdWString().c_str() << "]: " << " [" << QString::number( debugLevel ).toStdWString().c_str() << "]: "
<< msg << endl; << msg << endl;
} }
wcout.flush(); wcout.flush();