fix logging

This commit is contained in:
Erik 2016-06-15 11:00:21 -04:00
parent 7c3de9f30a
commit bddc9dc6aa

View File

@ -47,7 +47,10 @@ public extension SocketLogger {
private func abstractLog(_ logType: String, message: String, type: String, args: [Any]) {
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)
}
}