Skip to content

Commit

Permalink
[#2977] Improve docs of ckan.tests.helpers.RecordingLogHandler
Browse files Browse the repository at this point in the history
Mention that it's usually best to simply use the `ckan.tests.recorded_logs`
context manager.
  • Loading branch information
torfsen committed Sep 12, 2016
1 parent 4fcc8c1 commit 4bd5521
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/tests/helpers.py
Expand Up @@ -623,6 +623,9 @@ class RecordingLogHandler(logging.Handler):
You can inspect the recorded messages via the ``messages`` attribute
(a dict that maps log levels to lists of messages) or by using
``assert_log``.
This class is rarely useful on its own, instead use
:py:func:`recorded_logs` to temporarily record log messages.
'''
def __init__(self, *args, **kwargs):
super(RecordingLogHandler, self).__init__(*args, **kwargs)
Expand Down

0 comments on commit 4bd5521

Please sign in to comment.