Initialise logging earlier.
This commit is contained in:
parent
213fb2cfb6
commit
0a67a00ec0
12
src/main.cpp
12
src/main.cpp
|
@ -287,6 +287,12 @@ int main(int argc, char* argv[]) {
|
||||||
|
|
||||||
CommandlineOptions options(argc, 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
|
// Only start a core application now so we can check if there's another
|
||||||
// Clementine running without needing an X server.
|
// Clementine running without needing an X server.
|
||||||
|
@ -326,12 +332,6 @@ int main(int argc, char* argv[]) {
|
||||||
lastfm::setNetworkAccessManager(new NetworkAccessManager);
|
lastfm::setNetworkAccessManager(new NetworkAccessManager);
|
||||||
#endif
|
#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
|
// Output the version, so when people attach log output to bug reports they
|
||||||
// don't have to tell us which version they're using.
|
// don't have to tell us which version they're using.
|
||||||
qLog(Info) << "Clementine" << CLEMENTINE_VERSION_DISPLAY;
|
qLog(Info) << "Clementine" << CLEMENTINE_VERSION_DISPLAY;
|
||||||
|
|
Loading…
Reference in New Issue