diff --git a/Source/SocketLogger.swift b/Source/SocketLogger.swift index d40d121..5db0902 100644 --- a/Source/SocketLogger.swift +++ b/Source/SocketLogger.swift @@ -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) } }