Initialise logging earlier.

This commit is contained in:
John Maguire 2014-03-12 19:06:00 +01:00
parent 213fb2cfb6
commit 0a67a00ec0
1 changed files with 6 additions and 6 deletions

View File

@ -287,6 +287,12 @@ int main(int argc, char* argv[]) {
CommandlineOptions options(argc, argv);
// Initialise logging
logging::Init();
logging::SetLevels(options.log_levels());
g_log_set_default_handler(reinterpret_cast<GLogFunc>(&logging::GLog),
nullptr);
{
// Only start a core application now so we can check if there's another
// Clementine running without needing an X server.
@ -326,12 +332,6 @@ int main(int argc, char* argv[]) {
lastfm::setNetworkAccessManager(new NetworkAccessManager);
#endif
// Initialise logging
logging::Init();
logging::SetLevels(options.log_levels());
g_log_set_default_handler(reinterpret_cast<GLogFunc>(&logging::GLog),
nullptr);
// Output the version, so when people attach log output to bug reports they
// don't have to tell us which version they're using.
qLog(Info) << "Clementine" << CLEMENTINE_VERSION_DISPLAY;