mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-01 07:57:01 +00:00
Change default logging settings
This commit is contained in:
parent
1bbce49b86
commit
9ab9a30dc7
@ -719,14 +719,19 @@ private final class NotificationServiceHandler {
|
|||||||
|
|
||||||
let semaphore = DispatchSemaphore(value: 0)
|
let semaphore = DispatchSemaphore(value: 0)
|
||||||
var loggingSettings = LoggingSettings.defaultSettings
|
var loggingSettings = LoggingSettings.defaultSettings
|
||||||
let _ = (self.accountManager.transaction { transaction -> LoggingSettings in
|
if buildConfig.isInternalBuild {
|
||||||
|
loggingSettings = LoggingSettings(logToFile: true, logToConsole: false, redactSensitiveData: true)
|
||||||
|
}
|
||||||
|
let _ = (self.accountManager.transaction { transaction -> LoggingSettings? in
|
||||||
if let value = transaction.getSharedData(SharedDataKeys.loggingSettings)?.get(LoggingSettings.self) {
|
if let value = transaction.getSharedData(SharedDataKeys.loggingSettings)?.get(LoggingSettings.self) {
|
||||||
return value
|
return value
|
||||||
} else {
|
} else {
|
||||||
return LoggingSettings.defaultSettings
|
return nil
|
||||||
}
|
}
|
||||||
}).start(next: { value in
|
}).start(next: { value in
|
||||||
loggingSettings = value
|
if let value {
|
||||||
|
loggingSettings = value
|
||||||
|
}
|
||||||
semaphore.signal()
|
semaphore.signal()
|
||||||
})
|
})
|
||||||
semaphore.wait()
|
semaphore.wait()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user