diff --git a/CHANGELOG.md b/CHANGELOG.md index 84b78d6..100b9d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Make `logMessage` method public. [#77](https://github.com/sushichop/Puppy/pull/77) - Add method to support flushing log message. [#79](https://github.com/sushichop/Puppy/pull/79) - Make `dateFormat` function more efficient. [#81](https://github.com/sushichop/Puppy/pull/81) +- Update `Logging` module to 1.5.2 or later. [#82](https://github.com/sushichop/Puppy/pull/82) ## [0.6.0](https://github.com/sushichop/Puppy/releases/tag/0.6.0) (2022-11-29) diff --git a/Externals/CMakeLists.txt b/Externals/CMakeLists.txt index 96f3c3b..046d680 100644 --- a/Externals/CMakeLists.txt +++ b/Externals/CMakeLists.txt @@ -2,14 +2,15 @@ include(FetchContent) FetchContent_Declare(swift-log GIT_REPOSITORY https://github.com/apple/swift-log.git - GIT_TAG 1.4.4 + GIT_TAG 1.5.2 ) FetchContent_MakeAvailable(swift-log) add_library(Logging ${swift-log_SOURCE_DIR}/Sources/Logging/Locks.swift + ${swift-log_SOURCE_DIR}/Sources/Logging/LogHandler.swift ${swift-log_SOURCE_DIR}/Sources/Logging/Logging.swift - ${swift-log_SOURCE_DIR}/Sources/Logging/LogHandler.swift) + ${swift-log_SOURCE_DIR}/Sources/Logging/MetadataProvider.swift) target_link_libraries(Logging PRIVATE $<$>:Foundation>) diff --git a/Package.resolved b/Package.resolved index 81b1835..40da984 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log.git", "state" : { - "revision" : "6fe203dc33195667ce1759bf0182975e4653ba1c", - "version" : "1.4.4" + "revision" : "32e8d724467f8fe623624570367e3d50c5638e46", + "version" : "1.5.2" } } ], diff --git a/Package.swift b/Package.swift index 016fa50..6e8c7cd 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( .library(name: "Puppy", targets: ["Puppy"]), ], dependencies: [ - .package(url: "https://github.com/apple/swift-log.git", .upToNextMinor(from: "1.4.4")), + .package(url: "https://github.com/apple/swift-log.git", .upToNextMinor(from: "1.5.2")), ], targets: [ .target(name: "CPuppy", diff --git a/Puppy.xcodeproj/project.pbxproj b/Puppy.xcodeproj/project.pbxproj index dd309ac..37c5ae4 100644 --- a/Puppy.xcodeproj/project.pbxproj +++ b/Puppy.xcodeproj/project.pbxproj @@ -28,7 +28,7 @@ C74F94C326777E1D003A88BE /* CPuppy.h in Headers */ = {isa = PBXBuildFile; fileRef = C712BB09266F31A60016A768 /* CPuppy.h */; settings = {ATTRIBUTES = (Public, ); }; }; C74F94C826778428003A88BE /* CPuppy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C74F94A926777D38003A88BE /* CPuppy.framework */; }; C7695BB42533303900E0CA22 /* MockLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7695BB32533303900E0CA22 /* MockLogger.swift */; }; - C7756CE928F5C25700BB26F3 /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = C7756CE828F5C25700BB26F3 /* Logging */; }; + C77B4C0729B62CE000F94C0E /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = C77B4C0629B62CE000F94C0E /* Logging */; }; C789CB8E27A81146001C7589 /* CPuppy.c in Sources */ = {isa = PBXBuildFile; fileRef = C712BB0B266F31C80016A768 /* CPuppy.c */; }; C7CF79DB28F6DA0900CF55C3 /* Loggerable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7CF79DA28F6DA0900CF55C3 /* Loggerable.swift */; }; C7CF79DD28F6DB1B00CF55C3 /* FileLoggerable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7CF79DC28F6DB1B00CF55C3 /* FileLoggerable.swift */; }; @@ -144,7 +144,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C7756CE928F5C25700BB26F3 /* Logging in Frameworks */, + C77B4C0729B62CE000F94C0E /* Logging in Frameworks */, C74F94C826778428003A88BE /* CPuppy.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -385,7 +385,7 @@ ); name = Puppy; packageProductDependencies = ( - C7756CE828F5C25700BB26F3 /* Logging */, + C77B4C0629B62CE000F94C0E /* Logging */, ); productName = Puppy; productReference = C7ED719E252DBEC70065B955 /* Puppy.framework */; @@ -446,7 +446,7 @@ ); mainGroup = C7ED7194252DBEC70065B955; packageReferences = ( - C7756CE728F5C25700BB26F3 /* XCRemoteSwiftPackageReference "swift-log" */, + C77B4C0529B62CE000F94C0E /* XCRemoteSwiftPackageReference "swift-log" */, ); productRefGroup = C7ED719F252DBEC70065B955 /* Products */; projectDirPath = ""; @@ -903,20 +903,20 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - C7756CE728F5C25700BB26F3 /* XCRemoteSwiftPackageReference "swift-log" */ = { + C77B4C0529B62CE000F94C0E /* XCRemoteSwiftPackageReference "swift-log" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/apple/swift-log.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 1.4.4; + minimumVersion = 1.5.2; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - C7756CE828F5C25700BB26F3 /* Logging */ = { + C77B4C0629B62CE000F94C0E /* Logging */ = { isa = XCSwiftPackageProductDependency; - package = C7756CE728F5C25700BB26F3 /* XCRemoteSwiftPackageReference "swift-log" */; + package = C77B4C0529B62CE000F94C0E /* XCRemoteSwiftPackageReference "swift-log" */; productName = Logging; }; /* End XCSwiftPackageProductDependency section */ diff --git a/Puppy.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Puppy.xcworkspace/xcshareddata/swiftpm/Package.resolved index 81b1835..40da984 100644 --- a/Puppy.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Puppy.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log.git", "state" : { - "revision" : "6fe203dc33195667ce1759bf0182975e4653ba1c", - "version" : "1.4.4" + "revision" : "32e8d724467f8fe623624570367e3d50c5638e46", + "version" : "1.5.2" } } ], diff --git a/Tests/PuppyTests/LogFormatterTests.swift b/Tests/PuppyTests/LogFormatterTests.swift index 6e44a65..9581437 100644 --- a/Tests/PuppyTests/LogFormatterTests.swift +++ b/Tests/PuppyTests/LogFormatterTests.swift @@ -35,7 +35,7 @@ final class LogFormatterTests: XCTestCase { private let dateFormat = DateFormatter() func formatMessage(_ level: LogLevel, message: String, tag: String, function: String, - file: String, line: UInt, swiftLogInfo: [String : String], + file: String, line: UInt, swiftLogInfo: [String: String], label: String, date: Date, threadID: UInt64) -> String { let date = dateFormatter(date, withFormatter: dateFormat) return "\(date) \(message)" diff --git a/WORKSPACE b/WORKSPACE index 2235059..e105596 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -5,8 +5,8 @@ load( http_archive( name = "build_bazel_rules_swift", - url = "https://github.com/bazelbuild/rules_swift/releases/download/1.2.0/rules_swift.1.2.0.tar.gz", - sha256 = "51efdaf85e04e51174de76ef563f255451d5a5cd24c61ad902feeadafc7046d9", + url = "https://github.com/bazelbuild/rules_swift/releases/download/1.6.0/rules_swift.1.6.0.tar.gz", + sha256 = "d25a3f11829d321e0afb78b17a06902321c27b83376b31e3481f0869c28e1660", ) load( @@ -25,8 +25,8 @@ swift_rules_extra_dependencies() http_archive( name = "swift-log", - url = "https://github.com/apple/swift-log/archive/refs/tags/1.4.4.tar.gz", - sha256 = "48fe66426c784c0c20031f15dc17faf9f4c9037c192bfac2f643f65cb2321ba0", - strip_prefix = "swift-log-1.4.4", + url = "https://github.com/apple/swift-log/archive/refs/tags/1.5.2.tar.gz", + sha256 = "dfea6e00235eaab492fd818fc5e4c387769618c6436e862b1d4a4d73bf6c0301", + strip_prefix = "swift-log-1.5.2", build_file = "//:Externals/BUILD.bazel", )