Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Initialise the logger.

This needs only to be called from ArchGenXML.py and tests/runalltests.py.

        def initLog(filename):
    """Initialise the logger.

    This needs only to be called from ArchGenXML.py and tests/runalltests.py.
    """
    log = logging.getLogger()
    hdlr = logging.FileHandler(filename, 'w')
    formatter = logging.Formatter('%(name)-10s %(levelname)-5s %(message)s')
    hdlr.setFormatter(formatter)
    log.addHandler(hdlr)
    log.setLevel(logging.DEBUG)
        


src/a/r/archgenxml-2.6/src/archgenxml/tests/runalltests.py   archgenxml(Download)
# First things first.
from archgenxml import loginitializer
loginitializer.initLog('runalltests.log')
# End of stuff that needs to be done Right Now.