diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-28 12:43:02 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-28 17:06:52 +0100 |
commit | c44ee963f756cdac87e9ab739fc7e43aab70ad2d (patch) | |
tree | 2770552ad8aca7a04cb6bc731aa35af84d965242 /src | |
parent | db0e0cd1f043dd1fb7c6298db6158a78c41373df (diff) | |
download | mana-client-c44ee963f756cdac87e9ab739fc7e43aab70ad2d.tar.gz mana-client-c44ee963f756cdac87e9ab739fc7e43aab70ad2d.tar.bz2 mana-client-c44ee963f756cdac87e9ab739fc7e43aab70ad2d.tar.xz mana-client-c44ee963f756cdac87e9ab739fc7e43aab70ad2d.zip |
Avoid sending log output to the console on startup
By initializing the configuration before starting to log, so that we can
take into account the logToStandardOut setting.
Reviewed-by: Jared Adams
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client.cpp b/src/client.cpp index 9be7d0df..9fa61364 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -216,18 +216,17 @@ Client::Client(const Options &options): } initHomeDir(); + initConfiguration(); // Configure logger logger->setLogFile(mLocalDataDir + std::string("/mana.log")); + logger->setLogToStandardOut(config.getValue("logToStandardOut", 0)); // Log the mana version logger->log("Mana %s", FULL_VERSION); - initConfiguration(); initScreenshotDir(); - logger->setLogToStandardOut(config.getValue("logToStandardOut", 0)); - // Initialize SDL logger->log("Initializing SDL..."); if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) @@ -1018,7 +1017,6 @@ void Client::initHomeDir() void Client::initConfiguration() { // Fill configuration with defaults - logger->log("Initializing configuration..."); std::string defaultHost = branding.getValue("defaultServer", "server.themanaworld.org"); int defaultPort = (int) branding.getValue("defaultPort", DEFAULT_PORT); |