Removed unused methods

This commit is contained in:
Wojciech Nagrodzki 2018-08-22 19:58:52 +02:00
parent 35cbb3dfb1
commit f31ac61839
Signed by: wnagrodzki
GPG key ID: E9D0EB0302264569

View file

@ -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
}