Expose the log level in developer settings

This commit is contained in:
Stefan Ceriu
2023-08-23 14:58:44 +03:00
committed by Stefan Ceriu
parent beeb5fc83c
commit a19f5a4186
9 changed files with 44 additions and 39 deletions
+2 -10
View File
@@ -42,7 +42,7 @@ enum MXLog {
private static var target: String!
static func configure(target: String? = nil,
logLevel: TracingConfiguration.LogLevel? = nil,
logLevel: TracingConfiguration.LogLevel,
redirectToFiles: Bool = Constants.redirectToFiles,
maxLogFileCount: UInt = Constants.maxLogFileCount,
logFileSizeLimit: UInt = Constants.logFilesSizeLimit) {
@@ -58,15 +58,7 @@ enum MXLog {
return
}
if let logLevel {
setupTracing(configuration: .custom(logLevel: logLevel))
} else {
#if DEBUG
setupTracing(configuration: .debug)
#else
setupTracing(configuration: .release)
#endif
}
setupTracing(configuration: .custom(logLevel: logLevel))
if let target {
self.target = target