예제 #1
0
 def test_is_verbose(self):
     """Make sure is_verbose() does what it should :-)."""
     set_level(logging.INFO)
     assert not is_verbose()
     set_level(logging.DEBUG)
     assert is_verbose()
     set_level(logging.VERBOSE)
     assert is_verbose()
예제 #2
0
 def test_is_verbose(self):
     """Make sure is_verbose() does what it should :-)."""
     set_level(logging.INFO)
     assert not is_verbose()
     set_level(logging.DEBUG)
     assert is_verbose()
     set_level(logging.VERBOSE)
     assert is_verbose()
예제 #3
0
def enable_debug():
    '''
    Increase logging level to debug
    '''
    while not coloredlogs.is_verbose():
        coloredlogs.increase_verbosity()
예제 #4
0
def disable_debug():
    '''
    Decrease logging level below debug
    '''
    while coloredlogs.is_verbose():
        coloredlogs.decrease_verbosity()
예제 #5
0
 def test_is_verbose(self):
     """Make sure is_verbose() does what it should :-)."""
     assert coloredlogs.root_handler.level == logging.INFO
     assert not coloredlogs.is_verbose()
     coloredlogs.set_level(logging.VERBOSE)
     assert coloredlogs.is_verbose()