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

All Samples(205)  |  Call(193)  |  Derive(0)  |  Import(12)
Initialize logging to a specified file.

@return: A L{FileLogObserver} if a new observer is added, None otherwise.

        def startLogging(file, *a, **kw):
    """
    Initialize logging to a specified file.

    @return: A L{FileLogObserver} if a new observer is added, None otherwise.
    """
    if isinstance(file, StdioOnnaStick):
        return
    flo = FileLogObserver(file)
    startLoggingWithObserver(flo.emit, *a, **kw)
    return flo
        


src/t/w/Twisted-12.3.0/doc/core/examples/testlogging.py   Twisted(Download)
def startlog():
    log.startLogging(sys.stdout)
 
def end():
    reactor.stop()

src/t/w/Twisted-12.3.0/doc/core/examples/mouse.py   Twisted(Download)
    if o.opts['outfile']:
        logFile = o.opts['outfile']
    log.startLogging(logFile)
 
    SerialPort(McFooMouse(), o.opts['port'], reactor, baudrate=int(o.opts['baudrate']))

src/t/w/Twisted-12.3.0/doc/core/examples/rotatinglog.py   Twisted(Download)
 
# setup logging to use our new logfile
log.startLogging(f)
 
# print a few message

src/t/w/Twisted-12.3.0/doc/core/examples/gpsfix.py   Twisted(Download)
    if logFile is None:
        logFile = sys.stdout
    log.startLogging(logFile)
 
    if o.opts['zodiac']:

src/t/w/Twisted-12.3.0/doc/mail/examples/imap4client.py   Twisted(Download)
def ebConnection(reason):
    """
    Fallback error-handler. If anything goes wrong, log it and quit.
    """
    log.startLogging(sys.stdout)

src/t/x/txtorcon-0.7/examples/stream_circuit_logger.py   txtorcon(Download)
    reactor.stop()
 
log.startLogging(sys.stdout)
 
d = None

src/t/w/Twisted-12.3.0/doc/words/examples/pb_client.py   Twisted(Download)
    if len(sys.argv) != 6:
        raise SystemExit("Usage: %s host port username password group" % (sys.argv[0],))
    log.startLogging(sys.stdout)
 
    host, port, username, password, group = sys.argv[1:]

src/t/w/Twisted-12.3.0/doc/core/examples/courier.py   Twisted(Download)
# Setup log file
from twisted.python import log
log.startLogging(open(LOGFILE, 'a'))
import sys
sys.stderr = log.logfile

src/t/w/Twisted-12.3.0/doc/core/examples/threadedselect/Cocoa/SimpleWebClient/Twistzilla.py   Twisted(Download)
 
if __name__ == '__main__':
    log.startLogging(sys.stdout)
    AppHelper.runEventLoop()
 

src/t/w/Twisted-12.3.0/doc/core/examples/streaming.py   Twisted(Download)
 
from zope.interface import implements
from twisted.python.log import startLogging
from twisted.internet import interfaces, reactor
from twisted.internet.protocol import Factory
 
 
startLogging(stdout)
factory = Factory()
factory.protocol = ServeRandom

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