Example #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'},
    )
Example #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'},
    )
Example #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},
    )
Example #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},
    )