Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Logging module to 1.5.2 or later #82

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 3 additions & 2 deletions Externals/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<$<NOT:$<PLATFORM_ID:Darwin>>:Foundation>)
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 8 additions & 8 deletions Puppy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -144,7 +144,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C7756CE928F5C25700BB26F3 /* Logging in Frameworks */,
C77B4C0729B62CE000F94C0E /* Logging in Frameworks */,
C74F94C826778428003A88BE /* CPuppy.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -385,7 +385,7 @@
);
name = Puppy;
packageProductDependencies = (
C7756CE828F5C25700BB26F3 /* Logging */,
C77B4C0629B62CE000F94C0E /* Logging */,
);
productName = Puppy;
productReference = C7ED719E252DBEC70065B955 /* Puppy.framework */;
Expand Down Expand Up @@ -446,7 +446,7 @@
);
mainGroup = C7ED7194252DBEC70065B955;
packageReferences = (
C7756CE728F5C25700BB26F3 /* XCRemoteSwiftPackageReference "swift-log" */,
C77B4C0529B62CE000F94C0E /* XCRemoteSwiftPackageReference "swift-log" */,
);
productRefGroup = C7ED719F252DBEC70065B955 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions Puppy.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Tests/PuppyTests/LogFormatterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
10 changes: 5 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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",
)