Skip to content

Commit 2f818b2

Browse files
Fixed Invalid index used in Debug logs (#3923)
* fix: correct log warning format for LogWarning * Update CHANGELOG.md --------- Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
1 parent 81452c1 commit 2f818b2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
### Fixes
1515

1616
- Fixed duplicate SentryMauiEventProcessors ([#3905](https://github.com/getsentry/sentry-dotnet/pull/3905))
17+
- Fixed invalid string.Format index in Debug logs for the DiagnosticSource integration ([#3923](https://github.com/getsentry/sentry-dotnet/pull/3923))
1718

1819
### Dependencies
1920

src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFCommandDiagnosticSourceHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private static void SetCommandId(ISpan span, Guid? commandId)
3434
span.Operation == Operation &&
3535
TryGetCommandId(span) == commandId);
3636
}
37-
Options.LogWarning("No correlation id found for {1}.", Operation);
37+
Options.LogWarning("No correlation id found for {0}.", Operation);
3838
return null;
3939
}
4040

@@ -49,6 +49,6 @@ protected override void SetSpanReference(ISpan span, object? diagnosticSourceVal
4949
}
5050
return;
5151
}
52-
Options.LogWarning("No correlation id can be set for {1}.", Operation);
52+
Options.LogWarning("No correlation id can be set for {0}.", Operation);
5353
}
5454
}

src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal EFConnectionDiagnosticSourceHelper(IHub hub, SentryOptions options) : b
2222
span.Operation == Operation &&
2323
TryGetConnectionId(span) == connectionId);
2424
}
25-
Options.LogWarning("No correlation id found for {1}.", Operation);
25+
Options.LogWarning("No correlation id found for {0}.", Operation);
2626
return null;
2727
}
2828

0 commit comments

Comments
 (0)