aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-13 18:06:57 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-13 18:06:57 +0530
commitae565db37180c70c65396dd0a718afda4b42a694 (patch)
treefa6229a7df609d1d5bdc28d9d412f3dc3536aa2b
parentLogging: Tag the entries in the merged log (diff)
downloadwireguard-apple-ae565db37180c70c65396dd0a718afda4b42a694.tar.xz
wireguard-apple-ae565db37180c70c65396dd0a718afda4b42a694.zip
Logging: file_log doesn't need the message type
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r--WireGuard/Shared/Logging/Logger.swift6
1 files changed, 3 insertions, 3 deletions
diff --git a/WireGuard/Shared/Logging/Logger.swift b/WireGuard/Shared/Logging/Logger.swift
index 9ba28a3f..88df246a 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<UInt8>) -> 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)