diff --git a/Sources/Logging/DiagnosticsLogger.swift b/Sources/Logging/DiagnosticsLogger.swift index ee9354f..ddd8702 100644 --- a/Sources/Logging/DiagnosticsLogger.swift +++ b/Sources/Logging/DiagnosticsLogger.swift @@ -62,7 +62,7 @@ public final class DiagnosticsLogger { /// - file: The file from which the log is send. Defaults to `#file`. /// - function: The functino from which the log is send. Defaults to `#function`. /// - line: The line from which the log is send. Defaults to `#line`. - public static func log(message: String, file: StaticString = #file, function: StaticString = #function, line: UInt = #line) { + public static func log(message: String, file: String = #file, function: String = #function, line: UInt = #line) { standard.log(LogItem(.debug(message: message), file: file, function: function, line: line)) } @@ -73,7 +73,7 @@ public final class DiagnosticsLogger { /// - file: The file from which the log is send. Defaults to `#file`. /// - function: The functino from which the log is send. Defaults to `#function`. /// - line: The line from which the log is send. Defaults to `#line`. - public static func log(error: Error, description: String? = nil, file: StaticString = #file, function: StaticString = #function, line: UInt = #line) { + public static func log(error: Error, description: String? = nil, file: String = #file, function: String = #function, line: UInt = #line) { standard.log(LogItem(.error(error: error, description: description), file: file, function: function, line: line)) } } diff --git a/Sources/Logging/Loggable.swift b/Sources/Logging/Loggable.swift index 394d6ff..0096dba 100644 --- a/Sources/Logging/Loggable.swift +++ b/Sources/Logging/Loggable.swift @@ -101,7 +101,7 @@ struct LogItem: Loggable { let message: String let cssClass: LoggableCSSClass? - init(_ type: LogType, file: StaticString, function: StaticString, line: UInt) { + init(_ type: LogType, file: String, function: String, line: UInt) { let file = String(describing: file).split(separator: "/").last.map(String.init) ?? String(describing: file) prefix = "\(file):L\(line)" self.message = type.message