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

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Returns a dict to configure the logging module.

See http://bit.ly/U61957 for the schema.

        def extract_logging_config(config):
    """ Returns a dict to configure the logging module.

    See http://bit.ly/U61957 for the schema.
    """
    result = dict(
        version=1,
        handlers={
            'file': {
                'class': "logging.handlers.RotatingFileHandler",
                'formatter': 'awesome_formatter',
                'filename': config.get('logging', 'location') + '/mattd.log',
                'maxBytes': 10485760,
                'backupCount': 2,
            },
        },
        loggers={
            'mattd': {
                'level': config.get('logging', 'level'),
                'handlers': ['file'],
                'propagate': True,
            },
        },
        formatters={
            'awesome_formatter': {
                'format': config.get('logging', 'format'),
            },
        },
    )
    return result
        


src/m/a/mattd.core-0.0.5/mattd/core/app.py   mattd.core(Download)
 
    logging.config.dictConfig(
        mattd.core.config.extract_logging_config(config)
    )