Skip to content

Commit 7dbafef

Browse files
authored
feat(core): emit debug log when calling capture_log but logs are disabled (#849)
1 parent 3a18382 commit 7dbafef

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
- It's also possible to use `EventMapping::Combined` to map a `tracing` event to multiple items in Sentry.
1111
- `ctx` in the signatures of `event_from_event`, `breadcrumb_from_event` and `log_from_event` has been changed to take `impl Into<Option<&'context Context<'context, S>>>` to avoid cloning the `Context` when mapping to multiple items.
1212

13+
### Features
14+
15+
- feat(core): emit debug log when calling capture_log but logs are disabled (#849) by @lcian
16+
1317
### Fixes
1418

1519
- fix(logs): stringify u64 attributes greater than `i64::MAX` (#846) by @lcian

sentry-core/src/client.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ impl Client {
464464
/// Captures a log and sends it to Sentry.
465465
#[cfg(feature = "logs")]
466466
pub fn capture_log(&self, log: Log, scope: &Scope) {
467-
if !self.options().enable_logs {
467+
if !self.options.enable_logs {
468+
sentry_debug!("[Client] called capture_log, but options.enable_logs is set to false");
468469
return;
469470
}
470471
if let Some(log) = self.prepare_log(log, scope) {

0 commit comments

Comments
 (0)