Skip to content

Commit 900ffa4

Browse files
authored
ref(logs): enable logs by default if logs feature flag is used (#910)
1 parent 8af23ee commit 900ffa4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55
### Breaking changes
66

77
- feat(log): support combined LogFilters and RecordMappings ([#914](https://github.com/getsentry/sentry-rust/pull/914)) by @lcian
8-
- `sentry::integrations::log::LogFilter` has been changed to a `bitflags` struct.
8+
- Breaking change: `sentry::integrations::log::LogFilter` has been changed to a `bitflags` struct.
99
- It's now possible to map a `log` record to multiple items in Sentry by combining multiple log filters in the filter, e.g. `log::Level::ERROR => LogFilter::Event | LogFilter::Log`.
1010
- If using a custom `mapper` instead, it's possible to return a `Vec<sentry::integrations::log::RecordMapping>` to map a `log` record to multiple items in Sentry.
1111

1212
### Behavioral changes
1313

14-
- ref(log): send logs by default when logs feature flag is enabled ([#915](https://github.com/getsentry/sentry-rust/pull/915))
14+
- ref(log): send logs by default when logs feature flag is enabled ([#915](https://github.com/getsentry/sentry-rust/pull/915)) by @lcian
1515
- If the `logs` feature flag is enabled, the default Sentry `log` logger now sends logs for all events at or above INFO.
16+
- ref(logs): enable logs by default if logs feature flag is used ([#910](https://github.com/getsentry/sentry-rust/pull/910)) by @lcian
17+
- This changes the default value of `sentry::ClientOptions::enable_logs` to `true`.
18+
- This simplifies the setup of Sentry structured logs by requiring users to just add the `log` feature flag to the `sentry` dependency to opt-in to sending logs.
19+
- When the `log` feature flag is enabled, the `tracing` and `log` integrations will send structured logs to Sentry for all logs/events at or above INFO level by default.
1620

1721
## 0.43.0
1822

sentry-core/src/clientoptions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ impl Default for ClientOptions {
325325
user_agent: Cow::Borrowed(USER_AGENT),
326326
max_request_body_size: MaxRequestBodySize::Medium,
327327
#[cfg(feature = "logs")]
328-
enable_logs: false,
328+
enable_logs: true,
329329
#[cfg(feature = "logs")]
330330
before_send_log: None,
331331
}

0 commit comments

Comments
 (0)