Skip to content

Commit 580d5cd

Browse files
committed
Remove the logging panel as discussed
Closes #1683, closes #1681, closes #1119, closes #906, closes #695.
1 parent 4344a85 commit 580d5cd

File tree

8 files changed

+13
-234
lines changed

8 files changed

+13
-234
lines changed

debug_toolbar/panels/logging.py

-101
This file was deleted.

debug_toolbar/settings.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import warnings
12
from functools import lru_cache
23

34
from django.conf import settings
@@ -64,7 +65,6 @@ def get_config():
6465
"debug_toolbar.panels.templates.TemplatesPanel",
6566
"debug_toolbar.panels.cache.CachePanel",
6667
"debug_toolbar.panels.signals.SignalsPanel",
67-
"debug_toolbar.panels.logging.LoggingPanel",
6868
"debug_toolbar.panels.redirects.RedirectsPanel",
6969
"debug_toolbar.panels.profiling.ProfilingPanel",
7070
]
@@ -76,6 +76,14 @@ def get_panels():
7676
PANELS = list(settings.DEBUG_TOOLBAR_PANELS)
7777
except AttributeError:
7878
PANELS = PANELS_DEFAULTS
79+
80+
logging_panel = "debug_toolbar.panels.logging.LoggingPanel"
81+
if logging_panel in PANELS:
82+
PANELS = [panel for panel in PANELS if panel != logging_panel]
83+
warnings.warn(
84+
f"Please remove {logging_panel} from your DEBUG_TOOLBAR_PANELS setting.",
85+
DeprecationWarning,
86+
)
7987
return PANELS
8088

8189

debug_toolbar/templates/debug_toolbar/panels/logging.html

-27
This file was deleted.

docs/changes.rst

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Pending
99
* Use ``TOOLBAR_LANGUAGE`` setting when rendering individual panels
1010
that are loaded via AJAX.
1111
* Add decorator for rendering toolbar views with ``TOOLBAR_LANGUAGE``.
12+
* Removed the logging panel. The panel's implementation was too complex, caused
13+
memory leaks and sometimes very verbose and hard to silence output in some
14+
environments (but not others). The maintainers judged that time and effort is
15+
better invested elsewhere.
1216

1317
3.8.1 (2022-12-03)
1418
------------------

docs/configuration.rst

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ default value is::
3131
'debug_toolbar.panels.templates.TemplatesPanel',
3232
'debug_toolbar.panels.cache.CachePanel',
3333
'debug_toolbar.panels.signals.SignalsPanel',
34-
'debug_toolbar.panels.logging.LoggingPanel',
3534
'debug_toolbar.panels.redirects.RedirectsPanel',
3635
'debug_toolbar.panels.profiling.ProfilingPanel',
3736
]

docs/panels.rst

-7
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,6 @@ Signal
9797

9898
List of signals and receivers.
9999

100-
Logging
101-
~~~~~~~
102-
103-
.. class:: debug_toolbar.panels.logging.LoggingPanel
104-
105-
Logging output via Python's built-in :mod:`logging` module.
106-
107100
Redirects
108101
~~~~~~~~~
109102

tests/panels/test_history.py

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class HistoryViewsTestCase(IntegrationTestCase):
7777
"TemplatesPanel",
7878
"CachePanel",
7979
"SignalsPanel",
80-
"LoggingPanel",
8180
"ProfilingPanel",
8281
}
8382

tests/panels/test_logging.py

-96
This file was deleted.

0 commit comments

Comments
 (0)