Why is tornado.application logger ignored?
See original GitHub issueIt appears Sentry do not report any logs from tornado.application logger
https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/tornado.py#L53 ignore_logger(“tornado.application”)
However, it seems the default logger used by Tornado to report unhandled exceptions:
def log_exception(
self,
typ: "Optional[Type[BaseException]]",
value: Optional[BaseException],
tb: Optional[TracebackType],
) -> None:
"""Override to customize logging of uncaught exceptions.
By default logs instances of `HTTPError` as warnings without
stack traces (on the ``tornado.general`` logger), and all
other exceptions as errors with stack traces (on the
``tornado.application`` logger).
.. versionadded:: 3.1
"""
if isinstance(value, HTTPError):
if value.log_message:
format = "%d %s: " + value.log_message
args = [value.status_code, self._request_summary()] + list(value.args)
gen_log.warning(format, *args)
else:
app_log.error( # type: ignore
"Uncaught exception %s\n%r",
self._request_summary(),
self.request,
exc_info=(typ, value, tb),
)
How are we supposed to propagate uncaught exceptions in a Tornado based application to Sentry with Tornado integration?
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
python - Tornado - No handlers could be found for logger ...
What is the issue? I've already Googled No handlers could be found for logger "tornado.application". and surprisingly all urls suggest same ...
Read more >Source code for tornado.log
Tornado uses three logger streams: * ``tornado.access``: Per-request logging for ... basestring_type try: import colorama # type: ignore except ImportError: ...
Read more >tornado logging - Google Groups
Start the script and observe that a file named "log" is created, open it and see that "Starting up" was written to it....
Read more >web.mit.edu/kolya/.f/root/net.mit.edu/athena.mit.e...
Tornado uses three logger streams: * ``tornado.access``: Per-request ... import curses # type: ignore except ImportError: curses = None # Logger objects for ......
Read more >bokeh.server.tornado — Bokeh 3.0.2 Documentation
... Provides the Bokeh Server Tornado application. ... None: log.trace("Running session cleanup job") # type: ignore[attr-defined] for app in self.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for not having been clear about this: yes, we do not receive any report in Sentry. I asked our python developper to check locally why the monkeypatch did not work.
we re-enabled the logger for now