changing log level

This commit is contained in:
mcinj 2022-05-13 22:33:10 -04:00
parent f3ddfc8297
commit 6a1c7a36d8
5 changed files with 37 additions and 30 deletions

View file

@ -14,7 +14,7 @@ console_output.setLevel(logging.INFO)
console_format = logging.Formatter(log_format)
console_output.setFormatter(console_format)
info_log_file = RotatingFileHandler('../config/info.log', maxBytes=500000, backupCount=10)
info_log_file = RotatingFileHandler('../config/info.log', maxBytes=10000, backupCount=10)
info_log_file.setLevel(logging.INFO)
info_log_format = logging.Formatter(log_format)
info_log_file.setFormatter(info_log_format)
@ -22,19 +22,6 @@ info_log_file.setFormatter(info_log_format)
logging.root.addHandler(console_output)
logging.root.addHandler(info_log_file)
logging.info("""
-------------------------------------------------------------------------------------
_____ _ _ __ _ ____ _
/ ____|| | (_) / _|| | | _ \ | |
| (___ | |_ ___ __ _ _ __ ___ __ _ _ | |_ | |_ ___ | |_) | ___ | |_
\___ \ | __|/ _ \ / _` || '_ ` _ \ / _` || || _|| __|/ __| | _ < / _ \ | __|
____) || |_| __/| (_| || | | | | || (_| || || | | |_ \__ \ | |_) || (_) || |_
|_____/ \__|\___| \__,_||_| |_| |_| \__, ||_||_| \__||___/ |____/ \___/ \__|
__/ |
|___/
-------------------------------------------------------------------------------------
""")
def get_logger(name):
l = logging.getLogger(name)