summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/logger.cpp5
-rw-r--r--src/progs/dyecmd/client.cpp2
-rw-r--r--src/progs/dyecmd/dyemain.cpp1
-rw-r--r--src/progs/manaplus/client.cpp2
5 files changed, 5 insertions, 6 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index c485c12e5..1dae4ed29 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -130,7 +130,6 @@ void setConfigDefaults(Configuration &cfg)
AddDEF("particleEmitterSkip", 1);
AddDEF("particleeffects", true);
AddDEF("mapparticleeffects", true);
- AddDEF("logToStandardOut", false);
AddDEF("opengl", 0);
#ifdef ANDROID
AddDEF("screenwidth", 0);
diff --git a/src/logger.cpp b/src/logger.cpp
index 8582d0b4b..c8317f808 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -126,6 +126,11 @@ void Logger::setLogFile(const std::string &logFilename)
{
std::cout << "Warning: error while opening " << logFilename <<
" for writing.\n";
+ mLogToStandardOut = true;
+ }
+ else
+ {
+ mLogToStandardOut = false;
}
}
diff --git a/src/progs/dyecmd/client.cpp b/src/progs/dyecmd/client.cpp
index 30451dbf5..631469f2b 100644
--- a/src/progs/dyecmd/client.cpp
+++ b/src/progs/dyecmd/client.cpp
@@ -222,8 +222,6 @@ void Client::gameInit()
chatLogger->setBaseLogDir(settings.options.chatLogDir);
}
*/
- logger->setLogToStandardOut(config.getBoolValue("logToStandardOut"));
-
// Log the client version
logger->log1(FULL_VERSION);
logger->log("Start configPath: " + config.getConfigPath());
diff --git a/src/progs/dyecmd/dyemain.cpp b/src/progs/dyecmd/dyemain.cpp
index a5e8a2a34..915d0e580 100644
--- a/src/progs/dyecmd/dyemain.cpp
+++ b/src/progs/dyecmd/dyemain.cpp
@@ -74,7 +74,6 @@ int main(int argc, char **argv)
}
logger = new Logger;
- logger->setLogToStandardOut(false);
SDL::initLogger();
VirtFs::init(argv[0]);
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index 4cf9923ee..be5c7ca81 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -346,8 +346,6 @@ void Client::gameInit()
chatLogger->setBaseLogDir(settings.options.chatLogDir);
}
- logger->setLogToStandardOut(config.getBoolValue("logToStandardOut"));
-
// Log the client version
logger->log1(FULL_VERSION);
logger->log("Start configPath: " + config.getConfigPath());