Did I find the right examples for you? yes no

All Samples(183)  |  Call(167)  |  Derive(0)  |  Import(16)
Add a new observer.

@type other: Provider of L{ILogObserver}
@param other: A callable object that will be called with each new log
    message (a dict).

src/u/d/udplog-0.1.1/doc/examples/twisted_logging.py   udplog(Download)
udplogger = UDPLogger()
observer = UDPLogObserver(udplogger, defaultCategory='twisted_logging')
log.addObserver(observer.emit)
 
def main():

src/t/w/twisted-network-programming-essentials-examples-HEAD/Chapter7-Logging/ex5-colorized_logging_test.py   twisted-network-programming-essentials-examples(Download)
 
observer = ColorizedLogObserver(sys.stdout)
log.addObserver(observer.emit)
 
log.msg("Starting experiment")

src/z/o/zope.app.twisted-3.5.0/src/twisted/trial/runner.py   zope.app.twisted(Download)
               print
               print x['format'] % x
        log.addObserver(seeWarnings)
        self._logWarnings = True
 

src/o/o/ooniprobe-1.0.1/ooni/utils/log.py   ooniprobe(Download)
 
        txlog.startLoggingWithObserver(self.stdoutObserver.emit)
        txlog.addObserver(self.fileObserver.emit)
 
    def stop(self):

src/z/o/zope.app.twisted-3.5.0/src/twisted/web2/log.py   zope.app.twisted(Download)
    def start(self):
        """Start observing log events."""
        tlog.addObserver(self.emit)
 
    def stop(self):

src/o/o/ooni-probe-HEAD/ooni/utils/log.py   ooni-probe(Download)
 
        txlog.startLoggingWithObserver(self.stdoutObserver.emit)
        txlog.addObserver(self.fileObserver.emit)
 
    def stop(self):

src/t/w/twisted-lock-HEAD/lock/utils.py   twisted-lock(Download)
 
from functools import wraps
from twisted.python.log import textFromEventDict, addObserver, removeObserver
from twisted.internet.defer import Deferred
from twisted.internet import reactor
    def start(self):
        """
        Start observing log events.
        """
        addObserver(self.emit)

src/s/p/spamfighter-0.2.0/spamfighter/service.py   spamfighter(Download)
 
    observer = log.FileLogObserver(sys.stderr)
    log.addObserver(observer.emit)
 
    from spamfighter import version

src/t/w/twittomatic-HEAD/twitter/master.py   twittomatic(Download)
    log.startLogging(sys.stdout)
    log.startLogging(DailyLogFile.fromFullPath(os.path.join(settings.LOG_DIRECTORY, 'master.log')), setStdout=1)
    log.addObserver(RedisLogObserver(connection).emit)
 
    factory = TwitterJobTrackerFactory(connection, TwitterJob, settings.MAX_CLIENTS, options=options)

src/s/w/swftp-HEAD/swftp/logging.py   swftp(Download)
    def start(self):
        log.addObserver(self)
 
    def stop(self):
        log.removeObserver(self)

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