• Home
  • Raw
  • Download

Lines Matching full:handlers

37     # create formatter and add it to the handlers
41 # add the handlers to the logger
153 Multiple handlers and formatters
157 minimum or maximum quota for the number of handlers you may add. Sometimes it
160 this up, simply configure the appropriate handlers. The logging calls in the
174 # create formatter and add it to the handlers
178 # add the handlers to logger
189 Notice that the 'application' code does not care about multiple handlers. All
192 The ability to create new handlers with higher- or lower-severity filters can be
261 This example uses console and file handlers, but you can use any number and
262 combination of handlers you choose.
330 import logging, logging.handlers
334 socketHandler = logging.handlers.SocketHandler('localhost',
335 logging.handlers.DEFAULT_TCP_LOGGING_PORT)
359 import logging.handlers
414 port=logging.handlers.DEFAULT_TCP_LOGGING_PORT,
454 the :meth:`~handlers.SocketHandler.makePickle` method and implementing your
631 to have all the processes log to a :class:`~handlers.SocketHandler`, and have a
659 logging package provides a :class:`~handlers.RotatingFileHandler`::
663 import logging.handlers
672 handler = logging.handlers.RotatingFileHandler(
729 'handlers': {
747 'handlers':['null'],
752 'handlers': ['mail_admins'],
757 'handlers': ['console', 'mail_admins'],
778 :class:`~logging.handlers.SysLogHandler` to insert a BOM into the message, but
790 :class:`~logging.handlers.SysLogHandler` instance, with a format string
895 .. _custom-handlers:
899 Customizing handlers with :func:`dictConfig`
902 There are times when you want to customize logging handlers in particular ways,
906 handlers in the stdlib don't offer built-in support. You can customize handler
932 'handlers': {
949 'handlers': ['file'],
975 'handlers': {
992 'handlers': ['file'],
1036 :class:`~logging.FileHandler` - for example, one of the rotating file handlers,
1081 'handlers': {
1089 'handlers': ['console']
1116 handlers and formatters. See :ref:`logging-config-dict-userdef` for more
1118 configuration, and see the other cookbook recipe :ref:`custom-handlers` above.
1191 might cause other handlers to be kept waiting. Here is a short example showing
1243 :class:`logging.handlers.MemoryHandler`, which allows buffering of logged events
1268 from logging.handlers import MemoryHandler
1405 'handlers': {
1416 'handlers': ['console1', 'console2'],