Did I find the right examples for you? yes no

All Samples(43)  |  Call(34)  |  Derive(2)  |  Import(7)
A handler class which buffers logging records in memory, periodically
flushing them to a target handler. Flushing occurs whenever the buffer
is full, or when an event of a certain severity or greater is seen.

src/r/o/rootpy-0.7.0/rootpy/logger/multilogging.py   rootpy(Download)
                mode='w')
        memoryHandler = logging.handlers.MemoryHandler(
                capacity=self.capacity,
                target=h)
        f = logging.Formatter(

src/s/a/sardana-1.0.0/src/sardana/tango/core/util.py   sardana(Download)
 
            # Create a memory handler and set the target to the file handler
            m_h = logging.handlers.MemoryHandler(10, flushLevel=taurus.Info)
            m_h.setTarget(f_h)
            handlers.append(f_h)

src/i/n/infi.logs_collector-0.0.2/src/infi/logs_collector/__init__.py   infi.logs_collector(Download)
def create_logging_handler_for_collection(tempdir, prefix):
    from sys import maxsize
    from os import path
    from logging import FileHandler, DEBUG, Formatter
    from logging.handlers import MemoryHandler
    target = FileHandler(path.join(tempdir, "{}.{}.debug.log".format(prefix, get_timestamp())))
    target.setFormatter(Formatter(**LOGGING_FORMATTER_KWARGS))
    handler = MemoryHandler(maxsize, target=target)

src/s/e/sequencer-1.7.4/lib/sequencer/tracer.py   sequencer(Download)
import sys, types
from logging import Handler, Formatter, DEBUG, INFO, WARNING, ERROR, CRITICAL
from logging.handlers import TimedRotatingFileHandler, MemoryHandler
 
import sequencer
        file_handler.setFormatter(formatter)
        # add the handlers to the logger
        root_logger.addHandler(MemoryHandler(8192,
                                             file_handler.level,
                                             file_handler))
                               formatter_for_level=formatter_for_level)
    console_handler.setFormatter(formatter)
    root_logger.addHandler(MemoryHandler(8192,
                                         console_handler.level,
                                         console_handler))

src/p/y/pymoul-HEAD/pymoul/trunk/src/moul/log.py   pymoul(Download)
        """
        # MemoryHandler doesn't flush w/o a target
        self.mhdlr = handlers.MemoryHandler(capacity=4*1024)
        self.mhdlr.setFormatter(self.format)
        self.root.addHandler(self.mhdlr)

src/p/y/pytex-0.1a/pytex/logging.py   pytex(Download)
 
        # Buffer the logging until no errors happen
        self.buffered_handler = logging.handlers.MemoryHandler(9999, CRITICAL)
        self.buffered_handler.setTarget(self.file_handler)
 

src/w/e/webassets-HEAD/src/webassets/filter/cssutils.py   webassets(Download)
            # useless. Disable them.
            log = logging.getLogger('assets.cssutils')
            log.addHandler(logging.handlers.MemoryHandler(10))
 
            # Newer versions of cssutils print a deprecation warning

src/p/y/PyMT-0.5.1/pymt/tools/designerapp/designer.py   PyMT(Download)
# Configure pymt BEFORE instance
os.environ['PYMT_SHADOW_WINDOW'] = 'False'
sys._pymt_logging_handler = logging.handlers.MemoryHandler(0)
import pymt
from pymt import pymt_logger

src/w/e/webassets-0.8/src/webassets/filter/cssutils.py   webassets(Download)
            # useless. Disable them.
            log = logging.getLogger('assets.cssutils')
            log.addHandler(logging.handlers.MemoryHandler(10))
 
            # Newer versions of cssutils print a deprecation warning

src/p/y/pyphant-1.0b1/pyphant/wxgui2/wxPyphantApplication.py   pyphant(Download)
console = logging.StreamHandler()
console.setLevel(logging.WARNING)
logbuffer = logging.handlers.MemoryHandler(1000)
logging.getLogger('').addHandler(console)
logging.getLogger('').addHandler(logbuffer)

  1 | 2 | 3 | 4  Next