Skip to content
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_V10.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

### Breaking Changes

- Enable logging by default (#8717)
- Remove `sendDefaultPii`; use `dataCollection` to configure automatic data collection (#8253)
- Remove Objective-C `@objc` attributes from SentrySDK (#8308)
- Remove deprecated `locale` from device context; use `locale` in culture context instead (#8325)
Expand Down
10 changes: 8 additions & 2 deletions Sources/Swift/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,14 @@

/// When enabled, the SDK sends logs to Sentry. Logs can be captured using the SentrySDK.logger
/// API, which provides structured logging with attributes.
/// @note Default value is @c false.
@objc public var enableLogs: Bool = false
/// @note Default value is @c true in v10, @c false in earlier versions.
@objc public var enableLogs: Bool = {
#if SDK_V10
return true
#else
return false
#endif // SDK_V10
}()

/// Use this callback to drop or modify a log before the SDK sends it to Sentry. Return nil to
/// drop the log.
Expand Down
4 changes: 4 additions & 0 deletions Tests/SentryTests/SentryOptionsTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ - (void)testEnableNetworkBreadcrumbs

- (void)testEnableLogs
{
#if SDK_V10
[self testBooleanField:@"enableLogs" defaultValue:YES];
#else
[self testBooleanField:@"enableLogs" defaultValue:NO];
#endif // SDK_V10
}

- (void)testEnableMetrics
Expand Down
Loading