• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(681)  |  Call(0)  |  Derive(646)  |  Import(35)
Handler instances dispatch logging events to specific destinations.

The base handler class. Acts as a placeholder which defines the Handler
interface. Handlers can optionally use Formatter instances to format
records as desired. By default, no formatter is specified; in this case,
the 'raw' message as determined by record.message is logged.

src/p/y/PyAMF-HEAD/doc/tutorials/examples/actionscript/jython/gui.py   PyAMF(Download)
class TextFieldLogger(logging.Handler):
    """
    Logging handler that displays PyAMF log messages in the status text field.
    """
    def __init__(self, textfield, *args, **kwargs):
        self.status = textfield
        logging.Handler.__init__(self, *args, **kwargs)

src/d/j/django-navbar-0.3.0/examples/dbgp/_logging/handlers.py   django-navbar(Download)
class SocketHandler(logging.Handler):
    """
    A handler class which writes logging records, in pickle format, to
    a streaming socket. The socket is kept open across logging calls.
    If the peer resets it, an attempt is made to reconnect on the next call.
    The pickle which is sent is that of the LogRecord's attribute dictionary
    (__dict__), so that the receiver does not need to have the logging module
class SysLogHandler(logging.Handler):
    """
    A handler class which sends formatted logging records to a syslog
    server. Based on Sam Rushing's syslog module:
    http://www.nightmare.com/squirl/python-ext/misc/syslog.py
    Contributed by Nicolas Untz (after which minor refactoring changes
    have been made).
class SMTPHandler(logging.Handler):
    """
    A handler class which sends an SMTP email for each logging event.
    """
    def __init__(self, mailhost, fromaddr, toaddrs, subject):
        """
        Initialize the handler.
class NTEventLogHandler(logging.Handler):
    """
    A handler class which sends events to the NT Event Log. Adds a
    registry entry for the specified application name. If no dllname is
    provided, win32service.pyd (which contains some basic message
    placeholders) is used. Note that use of these placeholders will make
    your event logs big, as the entire message source is held in the log.
class HTTPHandler(logging.Handler):
    """
    A class which sends records to a Web server, using either GET or
    POST semantics.
    """
    def __init__(self, host, url, method="GET"):
        """
class BufferingHandler(logging.Handler):
    """
  A handler class which buffers logging records in memory. Whenever each
  record is added to the buffer, a check is made to see if the buffer should
  be flushed. If it should, then flush() is expected to do what's needed.
    """
    def __init__(self, capacity):

src/c/h/changingsong-HEAD/trunk/samples/plugin_sys/pyutilib/pyutilib/component/core/core.py   changingsong(Download)
    class NullHandler(logging.Handler):
        def emit(self, record):         #pragma:nocover
            """Do not generate logging record"""
    log.addHandler(NullHandler())
    return log
 
 

src/c/h/changingsong-HEAD/samples/plugin_sys/pyutilib/pyutilib/component/core/core.py   changingsong(Download)
    class NullHandler(logging.Handler):
        def emit(self, record):         #pragma:nocover
            """Do not generate logging record"""
    log.addHandler(NullHandler())
    return log
 
 

src/z/p/zpkg-1.0.0/Dependencies/zpkgsetup-zpkg-1.0.0/zpkgsetup/loggingapi.py   zpkg(Download)
    from logging import getLogger
    from logging import CRITICAL, FATAL, ERROR, WARNING, WARN
    from logging import INFO, DEBUG, NOTSET
    from logging import Handler, StreamHandler
 
except ImportError:
 

src/z/p/zpkg-1.0.0/Support/zpkgsetup/loggingapi.py   zpkg(Download)
    from logging import getLogger
    from logging import CRITICAL, FATAL, ERROR, WARNING, WARN
    from logging import INFO, DEBUG, NOTSET
    from logging import Handler, StreamHandler
 
except ImportError:
 

src/g/s/gsdview-HEAD/trunk/exectools/qt4.py   gsdview(Download)
class Qt4LoggingHandler(logging.Handler):
    '''Custom handler for logging on Qt4 textviews.'''
 
    def __init__(self, textview):
        logging.Handler.__init__(self)
        self.textview = textview
        self._formats = self._setupFormats()
class Qt4DialogLoggingHandler(logging.Handler):
    '''Qt4 handler for the logging dialog.'''
 
    levelsmap = {
        logging.CRITICAL: QtGui.QMessageBox.Critical,
        # FATAL = CRITICAL
        logging.ERROR: QtGui.QMessageBox.Critical,

src/g/s/gsdview-HEAD/trunk/exectools/gtk2.py   gsdview(Download)
class GtkLoggingHandler(logging.Handler):
    '''Custom handler for logging on GTK+ textviews'''
 
    def __init__(self, textview):
        assert textview is not None
        self.textview = textview
        logging.Handler.__init__(self)
class GtkDialogLoggingHandler(logging.Handler):
    '''GTK handler for logging message dialog'''
 
    levelsmap = {
        logging.CRITICAL: gtk.MESSAGE_ERROR,
        # FATAL = CRITICAL
        logging.ERROR: gtk.MESSAGE_ERROR,

src/p/y/pyusb-HEAD/trunk/usb/__init__.py   pyusb(Download)
        class NullHandler(logging.Handler):
            def emit(self, record):
                pass
 
        logger.addHandler(NullHandler())
 
 

src/r/u/ruffus-2.2/doc/images/gallery/gallery.dless.py   ruffus(Download)
        class NullHandler(logging.Handler):
            """
            for when there is no logging
            """
            def emit(self, record):
                pass
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next