Example #1
0
 def test_level(self):
     log = Log(target='console', level=logging.ERROR).get_logger(__name__)
     log.debug('hello,world~')
     log.info('python logs package.')
     log.warning('do not touch it!')
     log.error('runtime error!!')
     log.critical('out of memory!!!')
Example #2
0
 def test_init_console(self):
     log = Log(target='console').get_logger(__name__)
     log.debug('hello,world')
Example #3
0
 def test_get_logger(self):
     log = Log(target='console').get_logger('TEST')
     log.debug('hello,world')
Example #4
0
 def test_init_rotating_file(self):
     log = Log(target='rotating_file').get_logger(__name__)
     log.debug('hello,world')