Skip to content

Remove the logging panel as discussed #1732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove the logging panel as discussed
Closes #1683, closes #1681, closes #1119, closes #906, closes #695.
  • Loading branch information
matthiask committed Jan 20, 2023
commit 580d5cd97ff93e37fd95a662897665d0e3edfbaf
101 changes: 0 additions & 101 deletions debug_toolbar/panels/logging.py

This file was deleted.

10 changes: 9 additions & 1 deletion debug_toolbar/settings.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import warnings
from functools import lru_cache

from django.conf import settings
Expand Down Expand Up @@ -64,7 +65,6 @@ def get_config():
"debug_toolbar.panels.templates.TemplatesPanel",
"debug_toolbar.panels.cache.CachePanel",
"debug_toolbar.panels.signals.SignalsPanel",
"debug_toolbar.panels.logging.LoggingPanel",
"debug_toolbar.panels.redirects.RedirectsPanel",
"debug_toolbar.panels.profiling.ProfilingPanel",
]
Expand All @@ -76,6 +76,14 @@ def get_panels():
PANELS = list(settings.DEBUG_TOOLBAR_PANELS)
except AttributeError:
PANELS = PANELS_DEFAULTS

logging_panel = "debug_toolbar.panels.logging.LoggingPanel"
if logging_panel in PANELS:
PANELS = [panel for panel in PANELS if panel != logging_panel]
warnings.warn(
f"Please remove {logging_panel} from your DEBUG_TOOLBAR_PANELS setting.",
DeprecationWarning,
)
return PANELS


Expand Down
27 changes: 0 additions & 27 deletions debug_toolbar/templates/debug_toolbar/panels/logging.html

This file was deleted.

4 changes: 4 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Pending
* Use ``TOOLBAR_LANGUAGE`` setting when rendering individual panels
that are loaded via AJAX.
* Add decorator for rendering toolbar views with ``TOOLBAR_LANGUAGE``.
* Removed the logging panel. The panel's implementation was too complex, caused
memory leaks and sometimes very verbose and hard to silence output in some
environments (but not others). The maintainers judged that time and effort is
better invested elsewhere.

3.8.1 (2022-12-03)
------------------
Expand Down
1 change: 0 additions & 1 deletion docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ default value is::
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
]
Expand Down
7 changes: 0 additions & 7 deletions docs/panels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ Signal

List of signals and receivers.

Logging
~~~~~~~

.. class:: debug_toolbar.panels.logging.LoggingPanel

Logging output via Python's built-in :mod:`logging` module.

Redirects
~~~~~~~~~

Expand Down
1 change: 0 additions & 1 deletion tests/panels/test_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class HistoryViewsTestCase(IntegrationTestCase):
"TemplatesPanel",
"CachePanel",
"SignalsPanel",
"LoggingPanel",
"ProfilingPanel",
}

Expand Down
96 changes: 0 additions & 96 deletions tests/panels/test_logging.py

This file was deleted.