Lines Matching refs:logging
29 import logging
35 class _LogFilter(logging.Filter):
36 def __init__(self, max_level=logging.CRITICAL):
37 logging.Filter.__init__(self)
44 class _StreamHandler(logging.StreamHandler):
45 """Simple subclass to ignore exceptions raised during logging output."""
178 logger = logging.getLogger("pkg")
186 logger = logging.getLogger("pkg")
196 level = logging.DEBUG
198 level = logging.INFO
205 return logging.getLogger("pkg")
208 """Resets client logging to its default state. This will cause
209 all logging.INFO entries to go to sys.stdout, and all entries of
210 logging.WARNING or higher to go to sys.stderr."""
212 logger = logging.getLogger("pkg")
213 logger.setLevel(logging.DEBUG)
222 # Minimum logging level for informational messages.
224 info_h.setLevel(logging.DEBUG)
226 info_h.setLevel(logging.INFO)
228 log_fmt = logging.Formatter()
230 # Enforce maximum logging level for informational messages.
231 info_f = _LogFilter(logging.INFO)
239 error_h.setLevel(logging.WARNING)