use_log2.py 422 Bytes
Newer Older
“安晓东” committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import logging

from lession_9.opration_log import configlog


class  test1():
    def __init__(self):
        self.logger = configlog()
    def use_log2_file(self):
        self.logger.get_log()
        logging.info('这是一个info级别的日志444444444444444444444444')
        logging.error('这是一个error级别的日志5555555555555555555555')
if __name__ == '__main__':
    te = test1()
    te.use_log2_file()