mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Make sure --logfile has precedence on config
Since we changed the default in the config file and since log dir had precedence on log file, the --logfile command line option wasn't doing anything anymore. We make sure it has an effect again overriding --logdir or the logDir config entry. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
parent
b0a38816fc
commit
167800320f
1 changed files with 3 additions and 1 deletions
|
@ -408,7 +408,9 @@ void Application::setupLogging()
|
|||
// might be called from second instance
|
||||
auto logger = Logger::instance();
|
||||
logger->setLogFile(_logFile);
|
||||
logger->setLogDir(!_logDir.isEmpty() ? _logDir : ConfigFile().logDir());
|
||||
if (_logFile.isEmpty()) {
|
||||
logger->setLogDir(_logDir.isEmpty() ? ConfigFile().logDir() : _logDir);
|
||||
}
|
||||
logger->setLogExpire(_logExpire > 0 ? _logExpire : ConfigFile().logExpire());
|
||||
logger->setLogFlush(_logFlush || ConfigFile().logFlush());
|
||||
logger->setLogDebug(_logDebug || ConfigFile().logDebug());
|
||||
|
|
Loading…
Reference in a new issue