mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
rewrite log service
This commit is contained in:
parent
b62fe18ff3
commit
5a30382991
1 changed files with 5 additions and 7 deletions
|
|
@ -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<Int8>(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<Int8>(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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue