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/python/integrations/logging/index.mdx
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,17 +54,15 @@ main()
54
54
-`"An exception happened"` will send the current exception from `sys.exc_info()` with the stack trace and everything to the Sentry Python SDK. If there's no exception, the current stack will be attached.
55
55
- The debug message `"I am ignored"` will not surface anywhere. To capture it, you need to lower `level` to `DEBUG` (See below).
56
56
57
-
Log records can additionally also be captured as [Sentry logs](/platforms/python/logs/) as long as the `enable_logs`experimental option is `True`.
57
+
Log records can additionally also be captured as [Sentry logs](/platforms/python/logs/) as long as the `enable_logs` option is `True`.
58
58
59
59
```python
60
60
import logging
61
61
import sentry_sdk
62
62
63
63
sentry_sdk.init(
64
64
# ...
65
-
_experiments={
66
-
"enable_logs": True,
67
-
},
65
+
enable_logs=True,
68
66
)
69
67
70
68
logging.info("I will be sent to Sentry logs")
@@ -102,12 +100,12 @@ You can pass the following keyword arguments to `LoggingIntegration()`:
102
100
103
101
-`event_level` (default `ERROR`): The Sentry Python SDK will report log records with a level higher than or equal to `event_level` as events as long as the logger itself is set to output records of those log levels (see note below). If a value of `None` occurs, the SDK won't send log records as events.
104
102
105
-
-`sentry_logs_level` (default `INFO`): The Sentry Python SDK will capture records with a level higher than or equal to `sentry_logs_level` as [Sentry structured logs](/platforms/python/logs/) as long as the `enable_logs`experimental option is `True`.
103
+
-`sentry_logs_level` (default `INFO`): The Sentry Python SDK will capture records with a level higher than or equal to `sentry_logs_level` as [Sentry structured logs](/platforms/python/logs/) as long as the `enable_logs` option is `True`.
-`"An exception happened"` will send the current exception from `sys.exc_info()` with the stack trace to Sentry. If there's no exception, the current stack will be attached.
69
69
- The debug message `"I am ignored"` will not be captured by Sentry. To capture it, set `level` to `DEBUG` or lower in `LoguruIntegration`.
70
70
71
-
Loguru log records can additionally also be captured as [Sentry logs](/platforms/python/logs/) as long as the `enable_logs`experimental option is `True`.
71
+
Loguru log records can additionally also be captured as [Sentry logs](/platforms/python/logs/) as long as the `enable_logs` option is `True`.
72
72
73
73
```python
74
74
import sentry_sdk
75
75
from loguru import logger
76
76
77
77
sentry_sdk.init(
78
78
# ...
79
-
_experiments={
80
-
"enable_logs": True,
81
-
},
79
+
enable_logs=True,
82
80
)
83
81
84
82
logger.info("I will be sent to Sentry logs")
@@ -152,12 +150,12 @@ sentry_sdk.init(
152
150
153
151
The Sentry Python SDK will capture log records with a level higher than or equal to `sentry_logs_level` as [Sentry structured logs](/platforms/python/logs/). If set to `None`, the SDK won't send records as logs.
154
152
155
-
To capture Loguru log records as Sentry logs, you must enable the experimental `enable_logs` option when initializing the SDK (regardless of the `sentry_logs_level` setting).
153
+
To capture Loguru log records as Sentry logs, you must enable the `enable_logs` option when initializing the SDK (regardless of the `sentry_logs_level` setting).
0 commit comments