Home | History | Annotate | Download | only in system

Lines Matching full:logging

23 """Supports the unit-testing of logging code.
26 logging module.
29 more advanced needs (e.g. unit-testing methods that configure logging),
34 import logging
40 """Represents a file-like object for unit-testing logging.
42 This is meant for passing to the logging.StreamHandler constructor.
62 # http://docs.python.org/library/logging.html#module-logging.handlers
87 self._log = LogTesting.setUp(self) # Turn logging on.
90 self._log.tearDown() # Turn off and reset logging.
121 return logging.getLogger()
124 def setUp(test_case, logging_level=logging.INFO):
125 """Configure logging for unit testing.
143 logging_level: An integer logging level that is the minimum level
148 handler = logging.StreamHandler(stream)
150 formatter = logging.Formatter("%(levelname)s: %(message)s")
164 """Assert there are no remaining log messages, and reset logging.
167 log messages, and then restores logging to its original state.
185 # the calling code when we want to check multiple logging calls in a