• Home
  • Raw
  • Download

Lines Matching refs:handlers

23 import logging.handlers
119 hlist = self.logger1.handlers + self.root_logger.handlers
122 hlist = self.logger2.handlers + self.root_logger.handlers
133 while self.root_logger.handlers:
134 h = self.root_logger.handlers[0]
346 handler = self.root_logger.handlers[0]
375 handler = self.root_logger.handlers[0]
485 self.root_logger.handlers[0].setLevel(SOCIABLE)
497 self.root_logger.handlers[0].setLevel(logging.NOTSET)
502 handler = self.root_logger.handlers[0]
560 h = logging.handlers.WatchedFileHandler(fn, encoding='utf-8', delay=True)
584 h = logging.handlers.SysLogHandler(sockname)
592 self.assertRaises(ValueError, logging.handlers.HTTPHandler,
595 h = logging.handlers.HTTPHandler('localhost', '/log', method)
597 h = logging.handlers.BufferingHandler(0)
601 h = logging.handlers.BufferingHandler(1)
617 (logging.handlers.RotatingFileHandler, (pfn, 'a')),
618 (logging.handlers.TimedRotatingFileHandler, (pfn, 'h')),
621 cases += ((logging.handlers.WatchedFileHandler, (pfn, 'w')),)
652 h = logging.handlers.WatchedFileHandler(fn, encoding='utf-8', delay=delay)
1071 h = logging.handlers.SMTPHandler(addr, 'me', 'you', 'Log',
1102 self.mem_hdlr = logging.handlers.MemoryHandler(10, logging.WARNING,
1157 self.mem_hdlr = logging.handlers.MemoryHandler(10, logging.WARNING,
1603 handler = logging.root.handlers[0]
1637 self.assertEqual(logging.getLogger().handlers[0].name, 'hand1')
1707 hcls = logging.handlers.SocketHandler
1713 self.root_logger.removeHandler(self.root_logger.handlers[0])
1821 hcls = logging.handlers.DatagramHandler
1827 self.root_logger.removeHandler(self.root_logger.handlers[0])
1902 hcls = logging.handlers.SysLogHandler
1908 self.root_logger.removeHandler(self.root_logger.handlers[0])
2006 root_logger.removeHandler(self.root_logger.handlers[0])
2030 self.h_hdlr = logging.handlers.HTTPHandler(host, '/frob',
2191 self.assertEqual(logger.handlers, [])
2194 self.assertEqual(len(logger.handlers), 1)
2195 self.assertIsInstance(logger.handlers[0], logging.NullHandler)
3225 handler = logging.root.handlers[0]
3359 handler = logging.getLogger('mymodule').handlers[0]
3366 handler = logging.getLogger("my_test_logger_custom_formatter").handlers[0]
3371 handler = logging.getLogger("my_test_logger_custom_formatter").handlers[0]
3380 handler = logging.getLogger("my_test_logger_custom_formatter").handlers[0]
3527 self.que_hdlr = logging.handlers.QueueHandler(self.queue)
3563 @unittest.skipUnless(hasattr(logging.handlers, 'QueueListener'),
3567 listener = logging.handlers.QueueListener(self.queue, handler)
3584 listener = logging.handlers.QueueListener(self.queue, handler,
3598 @unittest.skipUnless(hasattr(logging.handlers, 'QueueListener'),
3602 listener = logging.handlers.QueueListener(self.queue, self.root_hdlr)
3612 @unittest.skipUnless(hasattr(logging.handlers, 'QueueListener'),
3619 listener = logging.handlers.QueueListener(self.queue, self.que_hdlr)
3625 if hasattr(logging.handlers, 'QueueListener'):
3646 handler = logging.handlers.QueueHandler(log_queue)
3648 listener = logging.handlers.QueueListener(log_queue)
3661 @patch.object(logging.handlers.QueueListener, 'handle')
3669 @patch.object(logging.handlers.QueueListener, 'handle')
3708 expected = [[], [logging.handlers.QueueListener._sentinel]]
3717 listener = logging.handlers.QueueListener(log_queue)
4155 handlers = map(logging.weakref.ref, [handler0, handler1, handler2])
4157 logging.shutdown(handlerList=list(handlers))
4167 handlers = [logging.weakref.ref(handler)]
4169 logging.shutdown(handlerList=list(handlers))
4508 self.handlers = logging.root.handlers
4513 logging.root.handlers = []
4516 for h in logging.root.handlers[:]:
4522 setattr(logging.root, 'handlers', self.handlers)
4532 self.assertEqual(len(logging.root.handlers), 1)
4533 handler = logging.root.handlers[0]
4573 self.assertEqual(len(logging.root.handlers), 1)
4574 handler = logging.root.handlers[0]
4591 handler = logging.root.handlers[0]
4601 self.assertEqual(len(logging.root.handlers), 1)
4602 handler = logging.root.handlers[0]
4609 formatter = logging.root.handlers[0].formatter
4615 formatter = logging.root.handlers[0].formatter
4621 formatter = logging.root.handlers[0].formatter
4636 handlers = [logging.StreamHandler()]
4641 handlers=handlers)
4643 handlers=handlers)
4650 handlers = [
4656 handlers[2].setFormatter(f)
4657 logging.basicConfig(handlers=handlers)
4658 self.assertIs(handlers[0], logging.root.handlers[0])
4659 self.assertIs(handlers[1], logging.root.handlers[1])
4660 self.assertIs(handlers[2], logging.root.handlers[2])
4661 self.assertIsNotNone(handlers[0].formatter)
4662 self.assertIsNotNone(handlers[1].formatter)
4663 self.assertIs(handlers[2].formatter, f)
4664 self.assertIs(handlers[0].formatter, handlers[1].formatter)
4671 logging.basicConfig(level=logging.WARNING, handlers=old_handlers)
4675 self.assertEqual(len(logging.root.handlers), 1)
4676 logging.basicConfig(level=logging.INFO, handlers=new_handlers,
4681 self.assertEqual(len(logging.root.handlers), 1)
4694 self.assertEqual(len(logging.root.handlers), 1)
4695 handler = logging.root.handlers[0]
4714 self.assertEqual(len(logging.root.handlers), 1)
4715 handler = logging.root.handlers[0]
4732 self.assertEqual(len(logging.root.handlers), 1)
4733 handler = logging.root.handlers[0]
4754 self.assertEqual(len(logging.root.handlers), 1)
4755 handler = logging.root.handlers[0]
4890 for handler in self.logger.handlers:
5040 for handler in self.logger.handlers:
5200 rh = logging.handlers.RotatingFileHandler(
5207 rh = logging.handlers.RotatingFileHandler(
5213 rh = logging.handlers.RotatingFileHandler(self.fn, encoding="utf-8", maxBytes=1)
5220 rh = logging.handlers.RotatingFileHandler(self.fn, encoding="utf-8")
5228 rh = logging.handlers.RotatingFileHandler(
5241 class HandlerWithNamerAndRotator(logging.handlers.RotatingFileHandler):
5272 rh = logging.handlers.RotatingFileHandler(
5307 fh = logging.handlers.TimedRotatingFileHandler(
5316 fh = logging.handlers.TimedRotatingFileHandler(
5359 assertRaises(ValueError, logging.handlers.TimedRotatingFileHandler,
5361 assertRaises(ValueError, logging.handlers.TimedRotatingFileHandler,
5363 assertRaises(ValueError, logging.handlers.TimedRotatingFileHandler,
5369 rh = logging.handlers.TimedRotatingFileHandler(
5390 rh = logging.handlers.TimedRotatingFileHandler(
5436 rotator = logging.handlers.TimedRotatingFileHandler(p, when='s',
5483 rh = logging.handlers.TimedRotatingFileHandler(
5501 r = logging.handlers._MIDNIGHT - ((currentHour * 60 +
5526 h = logging.handlers.NTEventLogHandler('test_logging')