From ae565db37180c70c65396dd0a718afda4b42a694 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Thu, 13 Dec 2018 18:06:57 +0530 Subject: Logging: file_log doesn't need the message type Signed-off-by: Roopesh Chander --- WireGuard/Shared/Logging/Logger.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'WireGuard/Shared/Logging') diff --git a/WireGuard/Shared/Logging/Logger.swift b/WireGuard/Shared/Logging/Logger.swift index 9ba28a3..88df246 100644 --- a/WireGuard/Shared/Logging/Logger.swift +++ b/WireGuard/Shared/Logging/Logger.swift @@ -39,17 +39,17 @@ func wg_log(_ type: OSLogType, staticMessage msg: StaticString) { let msgString: String = msg.withUTF8Buffer { (ptr: UnsafeBufferPointer) -> String in return String(decoding: ptr, as: UTF8.self) } - file_log(type: type, message: msgString) + file_log(message: msgString) } func wg_log(_ type: OSLogType, message msg: String) { // Write to os log os_log("%{public}s", log: OSLog.default, type: type, msg) // Write to file log - file_log(type: type, message: msg) + file_log(message: msg) } -private func file_log(type: OSLogType, message: String) { +private func file_log(message: String) { message.withCString { messageCStr in if let logPtr = Logger.logPtr { write_msg_to_log(logPtr, messageCStr) -- cgit v1.2.3-59-g8ed1b