From f31ac6183983791d0acc31c6815a6e5d92e7b177 Mon Sep 17 00:00:00 2001 From: Wojciech Nagrodzki <278594+wnagrodzki@users.noreply.github.com> Date: Wed, 22 Aug 2018 19:58:52 +0200 Subject: [PATCH] Removed unused methods --- Logger/Logger.swift | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Logger/Logger.swift b/Logger/Logger.swift index 30d9cd4..7953f48 100644 --- a/Logger/Logger.swift +++ b/Logger/Logger.swift @@ -47,14 +47,6 @@ public protocol Logger { /// - line: The line number log method was called at. /// - function: The name of the declaration log method was called within. func description(for file: String, line: Int, function: String) -> String - - /// Transforms `object` into textual representation which will be a part of the log message. - /// - /// Customization point. Default implementation returns `logDescription` for objects implementing `LogStringConvertible`, - /// or `String(describing:object)` otherwise. - /// - /// - Parameter object: The object to be logged. - func description(for object: Any) -> String } /// Log level controls the conditions under which a message should be logged. @@ -123,14 +115,6 @@ extension Logger { return filename(fromFilePath: file) + ":\(line) \(function)" } - /// Returns `logDescription` for objects implementing `LogStringConvertible`, or `String(describing:object)` otherwise. - public func description(for object: Any) -> String { - if let logStringConvertible = object as? LogStringConvertible { - return logStringConvertible.logDescription - } - return String(describing: object) - } - private func filename(fromFilePath path: String) -> String { return URL(fileURLWithPath: path).deletingPathExtension().lastPathComponent }