Lines Matching full:logging

3 Autotest has some surprisingly complicated logging behaviour.
5 Managers allow you to define logging contexts, which define a set of rules on
8 wish to temporarily change how logging works, this gives you that mechanism.
11 fork-for-a-logging-subprocess ordeal that's better explained as
13 normal python logging
18 | +------stdout---->+LOGGING|
30 ||logging.info('')|| ||logging.info('')||
35 logging subprocess, and set its stdout/stderr fd's to the subprocess's stdin.
40 python logging in a very consistent way.
45 import logging
57 Configure the logging module using the specific configuration object, which
88 logger = logging.getLogger()
99 """Decorator to annotate functions we will tell logging not to log."""
106 # Copied from Python 2.4 logging/__init__.py Logger.findCaller and enhanced.
107 # The logging code remains the same and compatible with this monkey patching
119 if filename == logging._srcfile:
137 # Monkey patch our way around logging's design...
138 _original_logger__find_caller = logging.Logger.findCaller
142 logging.Logger.findCaller = _logging_manager_aware_logger__find_caller
148 File-like object that will receive messages pass them to the logging
158 def __init__(self, prefix='', level=logging.DEBUG):
188 Passes lines of output to the logging module.
190 logging.log(self._level, self._prefix + line)
222 the logging module by replacing the file objects with a new LoggingFile
223 that calls logging.log().
252 """Start directing the stream to the logging module."""
263 Called when the logging manager is about to push a new context onto the
264 stack and has changed logging settings. The StreamHandler can modify
272 Called when the logging manager is restoring a previous context.
280 Manages a stack of logging configurations, allowing clients to conveniently
281 add and remove logging destinations. Also keeps a list of StreamManagers
282 to easily direct streams into the logging module.
300 # * old_handlers: list of registered logging Handlers
310 stream will be directed to the logging module instead. Must be called
331 self.manage_stream(sys.stdout, logging.INFO,
342 Begin capturing output to the logging module.
384 Modify the logging module's registered handlers and push a new context
386 @param add_handlers_fn: function to modify the registered logging
397 class _TaggingFormatter(logging.Formatter):
419 @param clear_other_handlers - if true, clear out all other logging
478 # restore logging handlers
504 this will hang waiting for the logging subprocess to end.
525 input to the logging module, and we point the FD to that subprocess. As a
527 pick up the new logging settings (without disturbing any existing processes
528 using the old logging subprocess).
556 point logging StreamHandlers that point to this stream to a safe
558 to the logging subprocess, effectively getting doubly logged.
567 """ point logging StreamHandlers back to the original FD """
575 Redirect all configured logging StreamHandlers pointing to
579 points_to_stream = (isinstance(handler, logging.StreamHandler) and
586 new_handler = logging.StreamHandler(new_stream)
606 Spawn a subprocess to log all input to the logging module with the
629 logging.exception('Logging subprocess died:')
637 logging module until EOF.
645 logging.log(self._level, line.rstrip('\n'))
646 logging.debug('Logging subprocess finished')
658 # * child_pid: PID of the logging subprocess launched
684 logging.exception('Ended up killing logging subprocess at %s.',
687 logging.exception('Failed to cleanly shutdown logging subprocess:')
705 # spawn the initial logging subprocess