File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ========
2+ Main API
3+ ========
4+
5+ .. inherited-members necessary because of hack for Client and init methods
6+
7+ .. automodule :: sentry_sdk
8+ :members:
9+ :inherited-members:
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ This is the API documentation for `Sentry's Python SDK
66<https://sentry.io/for/python/> `_. For full documentation and other resources
77visit the `GitHub repository <https://github.com/getsentry/sentry-python >`_.
88
9- .. inherited-members necessary because of hack for Client and init methods
10-
11- .. automodule :: sentry_sdk
12- :members:
13- :inherited-members:
9+ .. toctree ::
10+ api
11+ integrations
Original file line number Diff line number Diff line change 1+ ============
2+ Integrations
3+ ============
4+
5+ Logging
6+ =======
7+
8+ .. module :: sentry_sdk.integrations.logging
9+
10+ .. autofunction :: ignore_logger
11+
12+ .. autoclass :: EventHandler
13+
14+ .. autoclass :: BreadcrumbHandler
Original file line number Diff line number Diff line change 2727_IGNORED_LOGGERS = set (["sentry_sdk.errors" ])
2828
2929
30- def ignore_logger (name ):
31- # type: (str) -> None
30+ def ignore_logger (
31+ name # type: str
32+ ):
33+ # type: (...) -> None
3234 """This disables recording (both in breadcrumbs and as events) calls to
3335 a logger of a specific name. Among other uses, many of our integrations
3436 use this to prevent their actions being recorded as breadcrumbs. Exposed
3537 to users as a way to quiet spammy loggers.
38+
39+ :param name: The name of the logger to ignore (same string you would pass to ``logging.getLogger``).
3640 """
3741 _IGNORED_LOGGERS .add (name )
3842
@@ -146,6 +150,12 @@ def _extra_from_record(record):
146150
147151
148152class EventHandler (logging .Handler , object ):
153+ """
154+ A logging handler that emits Sentry events for each log record
155+
156+ Note that you do not have to use this class if the logging integration is enabled, which it is by default.
157+ """
158+
149159 def emit (self , record ):
150160 # type: (LogRecord) -> Any
151161 with capture_internal_exceptions ():
@@ -204,6 +214,12 @@ def _emit(self, record):
204214
205215
206216class BreadcrumbHandler (logging .Handler , object ):
217+ """
218+ A logging handler that records breadcrumbs for each log record.
219+
220+ Note that you do not have to use this class if the logging integration is enabled, which it is by default.
221+ """
222+
207223 def emit (self , record ):
208224 # type: (LogRecord) -> Any
209225 with capture_internal_exceptions ():
You can’t perform that action at this time.
0 commit comments