Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

        def setupLogging(level=0, logfile=None):
    # this overrides any user debug setting in the boto configuration
    if not boto_config.has_section('Boto'):
        boto_config.add_section('Boto')

    import httplib
    if level > 4:
        httplib.HTTPConnection.debuglevel = 1

    if level == 0:
        level = 'WARN'
        boto_config.set('Boto', 'debug', '0')
    elif level == 1:
        level = 'INFO'
        boto_config.set('Boto', 'debug', '0')
    elif level == 2:
        level = 'DEBUG'
        boto_config.set('Boto', 'debug', '1')
    else:
        level = 'DEBUG'
        boto_config.set('Boto', 'debug', '2')

    logconf = {
        'version': 1,
        'formatters': {
            'simple': {
                'class': 'logging.Formatter',
                'format': simplefmt,
            }
        },
        'handlers': {
            'console': {
                'class': 'logging.StreamHandler',
                'level': level,
                'formatter': 'simple',
            }
        },
        'loggers': {
            'boto': {
                'handlers': ['console'],
                'propagate': True
            },
            'lacore': {
                'handlers': ['console'],
                'propagate': True
            },
            'multiprocessing': {
                'handlers': ['console'],
                'propagate': True
            },
            'requests.packages.urllib3': {
                'handlers': ['console'],
                'propagate': True
            },
            'twisted': {
                'handlers': ['console'],
                'propagate': True
            }
        },
        'root': {'level': level}
    }

    logging.config.dictConfig(logconf)

    return log_open(logfile)
        


src/l/o/longaccess-client-HEAD/lacli/log.py   longaccess-client(Download)
def setupLogging(level=0, logfile=None):
    ctx = lacore.log.setupLogging(level, logfile)
    getLogger().addHandler(
        getLogger('lacore').handlers[0])
    getLogger().propagate = True

src/l/a/lacore-0.1.3/lacore/t/__init__.py   lacore(Download)
from boto import set_stream_logger
from lacore.log import setupLogging
from lacore.date import epoch
from binascii import a2b_hex
from contextlib import contextmanager
def setup():
    set_stream_logger('boto')
    setupLogging(2)