You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/dotnet/guides/serilog/index.mdx
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,8 @@ Sentry provides an integration with `Serilog` through the [Sentry.Serilog NuGet
9
9
## Overview of the features
10
10
11
11
- Store log messages as breadcrumbs
12
-
- Send events to sentry
12
+
- Send events to Sentry
13
+
- Send structured logs to Sentry
13
14
14
15
Two separate settings define the minimum log level to keep the log entry as a `Breadcrumb` and to send an `Event` to Sentry. The events include any stored breadcrumb on that [scope](enriching-events/scopes/).
15
16
@@ -19,6 +20,8 @@ The default value to report a log entry as an event to Sentry is `Error`.
19
20
20
21
This means that out of the box, any `LogError` call will create an `Event` which will include all log messages of level `Information`, `Warning` and also `Error` and `Critical`.
21
22
23
+
Additionally, when enabled, log messages are sent to Sentry as [Structured Logs](logs/).
Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the `SentrySdk.Experimental.Logger` APIs.
3
+
Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the `SentrySdk.Logger` APIs.
4
4
5
-
The `SentrySdk.Experimental.Logger` instance exposes six methods that you can use to log messages at different log levels: `Trace`, `Debug`, `Info`, `Warning`, `Error`, and `Fatal`.
5
+
The `SentrySdk.Logger` instance exposes six methods that you can use to log messages at different log levels: `Trace`, `Debug`, `Info`, `Warning`, `Error`, and `Fatal`.
6
6
7
7
These properties will be sent to Sentry, and can be searched from within the Logs UI, and even added to the Logs views as a dedicated column.
Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the _Serilog_ APIs.
61
+
62
+
The static `Log` and instance `Logger` types expose various methods that you can use to log messages at six different log levels automatically mapped to Sentry's severity:
0 commit comments