From 05e92d6593ad6c7dab4f6ce6be46e66b96e3c3ff Mon Sep 17 00:00:00 2001 From: Cristian A Monterroza Date: Tue, 23 Jul 2024 00:40:01 -0700 Subject: [PATCH] Update format. --- Package.resolved | 21 ++++++++++++++++++++- Package.swift | 12 ++++++------ Sources/WrkstrmLog/Log+Shared.swift | 12 ++++++++---- Sources/WrkstrmLog/Log.swift | 21 ++++++++++++++------- 4 files changed, 48 insertions(+), 18 deletions(-) diff --git a/Package.resolved b/Package.resolved index b282015..31e2c12 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,24 @@ { + "originHash" : "35a1e544686ac5138e91cd674604255c1c9d20deb6589cbc878ab55dbdc0dfe2", "pins" : [ + { + "identity" : "swift-docc-plugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-docc-plugin", + "state" : { + "revision" : "26ac5758409154cc448d7ab82389c520fa8a8247", + "version" : "1.3.0" + } + }, + { + "identity" : "swift-docc-symbolkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-docc-symbolkit", + "state" : { + "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", + "version" : "1.0.0" + } + }, { "identity" : "swift-log", "kind" : "remoteSourceControl", @@ -10,5 +29,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/Package.swift b/Package.swift index 38b9981..c7b5e91 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,5 @@ // swift-tools-version:5.10 +import Foundation import PackageDescription // MARK: - Package Declaration @@ -14,7 +15,7 @@ let package = Package( .watchOS(.v9), ], products: [ - .library(name: "WrkstrmLog", targets: ["WrkstrmLog"]), + .library(name: "WrkstrmLog", targets: ["WrkstrmLog"]) ], dependencies: [ .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.1.0"), @@ -24,12 +25,11 @@ let package = Package( .target( name: "WrkstrmLog", dependencies: [.product(name: "Logging", package: "swift-log")], - swiftSettings: Package.Inject.shared.swiftSettings), + swiftSettings: Package.Inject.shared.swiftSettings + ), .testTarget(name: "WrkstrmLogTests", dependencies: ["WrkstrmLog"]), - ]) - -// PACKAGE_SERVICE_START_V0_0_1_HASH:f2c9eab644cc6416b9f6608bf581ad8c0b4c606c2c2dac5e62505e70cc7bfc53 -import Foundation + ] +) // MARK: - Package Service diff --git a/Sources/WrkstrmLog/Log+Shared.swift b/Sources/WrkstrmLog/Log+Shared.swift index cb539e0..b58983a 100644 --- a/Sources/WrkstrmLog/Log+Shared.swift +++ b/Sources/WrkstrmLog/Log+Shared.swift @@ -37,7 +37,8 @@ extension Log { function: function, line: line, column: column, - dso: dso) + dso: dso + ) } /// Logs a info message with the specified parameters. @@ -63,7 +64,8 @@ extension Log { function: function, line: line, column: column, - dso: dso) + dso: dso + ) } /// Logs an error message with the specified parameters. @@ -89,7 +91,8 @@ extension Log { function: function, line: line, column: column, - dso: dso) + dso: dso + ) } /// Logs a critical message and triggers a fatal error. @@ -116,6 +119,7 @@ extension Log { function: function, line: line, column: column, - dso: dso) + dso: dso + ) } } diff --git a/Sources/WrkstrmLog/Log.swift b/Sources/WrkstrmLog/Log.swift index bcfdd3d..b6a713b 100644 --- a/Sources/WrkstrmLog/Log.swift +++ b/Sources/WrkstrmLog/Log.swift @@ -132,7 +132,8 @@ public struct Log: Hashable { function: function, line: line, column: column, - dso: dso) + dso: dso + ) } /// Logs a informational message with the specified parameters. @@ -159,7 +160,8 @@ public struct Log: Hashable { function: function, line: line, column: column, - dso: dso) + dso: dso + ) } /// Logs an error message with the specified parameters. @@ -186,7 +188,8 @@ public struct Log: Hashable { function: function, line: line, column: column, - dso: dso) + dso: dso + ) } /// Logs a critical message and triggers a fatal error. @@ -214,7 +217,8 @@ public struct Log: Hashable { function: function, line: line, column: column, - dso: dso) + dso: dso + ) fatalError() } @@ -232,7 +236,8 @@ public struct Log: Hashable { string: file // swiftlint:disable:next force_unwrapping - .addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)! + .addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! + )! let fileName = url.lastPathComponent.replacingOccurrences(of: ".swift", with: "") let functionString = formattedFunction(function) switch style { @@ -256,7 +261,8 @@ public struct Log: Hashable { url.lastPathComponent, line, functionString, - String(describing: describable)) + String(describing: describable) + ) #endif // canImport(os) case .swift: @@ -274,7 +280,8 @@ public struct Log: Hashable { source: url.lastPathComponent, file: file, function: functionString, - line: line) + line: line + ) } } }