Lines Matching full:logging
6 import logging
17 logging.basicConfig(level=logging.DEBUG)
20 class AllowBelowSeverity(logging.Filter):
23 the normal logging level filtering does.
33 class VarLogMessageFormatter(logging.Formatter):
35 Respews logging.* strings on the DUT to /var/log/messages for easier
46 # string for logging. In py3 this is just not needed.
48 # logging.
58 global_level = logging.DEBUG
59 stdout_level = logging.INFO
60 stderr_level = logging.ERROR
69 file_formatter = logging.Formatter(fmt=FILE_FORMAT, datefmt=DATE_FORMAT)
73 console_formatter = logging.Formatter(fmt=CONSOLE_FORMAT,
80 self.logger = logging.getLogger()
81 self.global_level = logging.DEBUG
97 def add_stream_handler(self, stream, level=logging.DEBUG, datefmt=None):
98 handler = logging.StreamHandler(stream)
102 formatter = logging.Formatter(fmt=self.CONSOLE_FORMAT,
119 level=logging.DEBUG,
124 handler = logging.FileHandler(file_path)
128 formatter = logging.Formatter(fmt=self.FILE_FORMAT, datefmt=datefmt)
137 for level in (logging.DEBUG, logging.INFO, logging.WARNING,
138 logging.ERROR):
139 file_name = '%s.%s' % (log_name, logging.getLevelName(level))
160 self.stdout_level = logging.DEBUG
178 """Change logging formatter to include thread name.
182 log = logging.getLogger()
183 for handler in logging.getLogger().handlers:
184 if isinstance(handler, logging.FileHandler):
186 handler.setFormatter(logging.Formatter(
190 logging.debug('Logging handler\'s format updated with thread name.')