Optimize: log in background queue
This commit is contained in:
parent
02582da547
commit
e82efda6d6
|
@ -36,7 +36,9 @@ class Logger {
|
|||
}
|
||||
|
||||
static func log(msg:String ,level:ClashLogLevel = .unknow) {
|
||||
shared.logToFile(msg: "[\(level.rawValue)] \(msg)", level: level)
|
||||
DispatchQueue.global().async {
|
||||
shared.logToFile(msg: "[\(level.rawValue)] \(msg)", level: level)
|
||||
}
|
||||
}
|
||||
|
||||
func logFilePath() -> String {
|
||||
|
|
Loading…
Reference in New Issue