diff --git a/msgNotification/Utils.swift b/msgNotification/Utils.swift index d032440b4..4de533c19 100644 --- a/msgNotification/Utils.swift +++ b/msgNotification/Utils.swift @@ -33,13 +33,11 @@ class LinphoneLoggingServiceManager: LoggingServiceDelegate { let debugLevel = config.getInt(section: "app", key: "debugenable_preference", defaultValue: LogLevel.Debug.rawValue) let debugEnabled = (debugLevel >= LogLevel.Debug.rawValue && debugLevel < LogLevel.Error.rawValue) - if (debugEnabled) { - Factory.Instance.logCollectionPath = Factory.Instance.getDownloadDir(context: UnsafeMutablePointer(mutating: (APP_GROUP_ID as NSString).utf8String)) - Factory.Instance.enableLogCollection(state: LogCollectionState.Enabled) - log.domain = domain - log.logLevel = LogLevel(rawValue: debugLevel) - log.addDelegate(delegate: self) - } + Factory.Instance.logCollectionPath = Factory.Instance.getDownloadDir(context: UnsafeMutablePointer(mutating: (APP_GROUP_ID as NSString).utf8String)) + Factory.Instance.enableLogCollection(state: debugEnabled ? LogCollectionState.Enabled : LogCollectionState.Disabled) + log.domain = domain + log.logLevel = debugLevel==0 ? LogLevel.Fatal : LogLevel(rawValue: debugLevel) + log.addDelegate(delegate: self) } else { throw LinphoneError.loggingServiceUninitialized }