mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Don't truncate debug logs for emitted events
This commit is contained in:
parent
f893408dff
commit
df871ab15b
@ -5,7 +5,6 @@ Gracefully adapted from the TextPress system by Armin.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
from collections import defaultdict
|
||||
from operator import attrgetter
|
||||
from typing import TYPE_CHECKING, Any, NamedTuple
|
||||
@ -90,8 +89,12 @@ class EventManager:
|
||||
"""Emit a Sphinx event."""
|
||||
# not every object likes to be repr()'d (think
|
||||
# random stuff coming via autodoc)
|
||||
with contextlib.suppress(Exception):
|
||||
logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
|
||||
try:
|
||||
repr_args = repr(args)
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
logger.debug('[app] emitting event: %r%s', name, repr_args)
|
||||
|
||||
results = []
|
||||
listeners = sorted(self.listeners[name], key=attrgetter('priority'))
|
||||
|
Loading…
Reference in New Issue
Block a user