-
-
Notifications
You must be signed in to change notification settings - Fork 368
Structured Logs: Add SentrySwiftLog
Integration
#6286
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
base: main
Are you sure you want to change the base?
Changes from 26 commits
a72802e
7032e87
4b491c8
21dc2de
59117a4
2fcf8bb
467f314
00559c2
249759b
1c0a0d4
39dc722
3f82bb0
ce69ea1
825e5df
7139756
2408a07
f9062d6
f6bc914
fd73f1e
fb07770
befdf40
45c8ed8
0779263
601a5ae
4e20b63
a607ccb
3d57dc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,8 @@ var products: [Product] = [ | |
.library(name: "Sentry-WithoutUIKitOrAppKit", targets: ["Sentry-WithoutUIKitOrAppKit", "SentryCppHelper"]), | ||
.library(name: "Sentry-WithoutUIKitOrAppKit-WithARM64e", targets: ["Sentry-WithoutUIKitOrAppKit-WithARM64e", "SentryCppHelper"]), | ||
.library(name: "SentrySwiftUI", targets: ["Sentry", "SentrySwiftUI", "SentryCppHelper"]), | ||
.library(name: "SentryDistribution", targets: ["SentryDistribution"]) | ||
.library(name: "SentryDistribution", targets: ["SentryDistribution"]), | ||
.library(name: "SentrySwiftLog", targets: ["Sentry", "SentrySwiftLog"]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
] | ||
|
||
var targets: [Target] = [ | ||
|
@@ -45,21 +46,31 @@ var targets: [Target] = [ | |
url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.56.2/Sentry-WithoutUIKitOrAppKit-WithARM64e.xcframework.zip", | ||
checksum: "0c716f6a6475d8fd6e78b9204c74adffef5c0989f057c5d795989a667ae58047" //Sentry-WithoutUIKitOrAppKit-WithARM64e | ||
), | ||
.target ( | ||
.target( | ||
name: "SentrySwiftUI", | ||
dependencies: ["Sentry", "SentryInternal"], | ||
path: "Sources/SentrySwiftUI", | ||
exclude: ["SentryInternal/", "module.modulemap"], | ||
linkerSettings: [ | ||
.linkedFramework("Sentry") | ||
]), | ||
] | ||
), | ||
.target( | ||
name: "SentrySwiftLog", | ||
dependencies: ["Sentry", .product(name: "Logging", package: "swift-log")], | ||
path: "Sources/SentrySwiftLog", | ||
linkerSettings: [ | ||
.linkedFramework("Sentry") | ||
] | ||
), | ||
.target( | ||
name: "SentryInternal", | ||
path: "Sources/SentrySwiftUI", | ||
sources: [ | ||
"SentryInternal/" | ||
], | ||
publicHeadersPath: "SentryInternal/"), | ||
publicHeadersPath: "SentryInternal/" | ||
), | ||
.target( | ||
name: "SentryCppHelper", | ||
dependencies: ["Sentry"], | ||
|
@@ -104,7 +115,7 @@ if let env = env, String(cString: env, encoding: .utf8) == "1" { | |
name: "SentryObjc", | ||
dependencies: ["SentrySwift"], | ||
path: "Sources", | ||
exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "Resources", "Configuration", "SentryCppHelper", "SentryDistribution", "SentryDistributionTests"], | ||
exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "SentrySwiftLog", "Resources", "Configuration", "SentryCppHelper", "SentryDistribution", "SentryDistributionTests"], | ||
cSettings: [ | ||
.headerSearchPath("Sentry/include/HybridPublic"), | ||
.headerSearchPath("Sentry"), | ||
|
@@ -114,14 +125,19 @@ if let env = env, String(cString: env, encoding: .utf8) == "1" { | |
.headerSearchPath("SentryCrash/Installations"), | ||
.headerSearchPath("SentryCrash/Reporting/Filters"), | ||
.headerSearchPath("SentryCrash/Reporting/Filters/Tools"), | ||
.define("SDK_V9")]) | ||
.define("SDK_V9") | ||
] | ||
) | ||
]) | ||
} | ||
|
||
let package = Package( | ||
name: "Sentry", | ||
platforms: [.iOS(.v15), .macOS(.v12), .tvOS(.v15), .watchOS(.v8)], | ||
products: products, | ||
dependencies: [ | ||
.package(url: "https://github.com/apple/swift-log", from: "1.6.0") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
So basically this will lock our SDK users into exactly the |
||
], | ||
targets: targets, | ||
cxxLanguageStandard: .cxx14 | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this trying to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the CI jobs is replacing dependencies with local build artefacts. This broke, as
swift-log
was added to ourPackage.swift
. This code fixes those issues.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this only happen because of
swift-log
or should we do the fix in a separate PR?