Esempio n. 1
0
def test_configure_debug_log_bad_file(config, context):
    config['DEBUGLOG'] = '/nopenopenope'
    logs.configure(config)
    context.assert_log(
        msg='could not',
        name='talisker.logs',
        level='INFO',
        extra={'path': '/nopenopenope'},
    )
Esempio n. 2
0
def test_configure_debug_log_bad_file(config, context):
    config['DEBUGLOG'] = '/nopenopenope'
    logs.configure(config)
    context.assert_log(
        msg='could not',
        name='talisker.logs',
        level='INFO',
        extra={'path': '/nopenopenope'},
    )
Esempio n. 3
0
def test_configure_debug_log(config, context):
    tmp = tempfile.mkdtemp()
    logfile = os.path.join(tmp, 'log')
    config['DEBUGLOG'] = logfile
    logs.configure(config)
    context.assert_log(
        msg='enabling',
        name='talisker.logs',
        level='INFO',
        extra={'path': logfile},
    )
Esempio n. 4
0
def test_configure_debug_log(config, context):
    tmp = tempfile.mkdtemp()
    logfile = os.path.join(tmp, 'log')
    config['DEBUGLOG'] = logfile
    logs.configure(config)
    context.assert_log(
        msg='enabling',
        name='talisker.logs',
        level='INFO',
        extra={'path': logfile},
    )