fix logging
This commit is contained in:
parent
7c3de9f30a
commit
bddc9dc6aa
@ -47,7 +47,10 @@ public extension SocketLogger {
|
|||||||
private func abstractLog(_ logType: String, message: String, type: String, args: [Any]) {
|
private func abstractLog(_ logType: String, message: String, type: String, args: [Any]) {
|
||||||
guard log else { return }
|
guard log else { return }
|
||||||
|
|
||||||
NSLog("\(logType) \(type): \(args)")
|
let newArgs = args.map({arg -> CVarArg in String(arg)})
|
||||||
|
let messageFormat = String(format: message, arguments: newArgs) ?? ""
|
||||||
|
|
||||||
|
NSLog("\(logType) \(type): %@", messageFormat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user