mirror of
https://github.com/kuitoi/kuitoi-Server.git
synced 2026-04-24 09:06:36 +00:00
Update config_provider
This commit is contained in:
@@ -33,11 +33,15 @@ if os.path.exists(log_file):
|
||||
if os.path.exists(file):
|
||||
tar.add(file, os.path.basename(file))
|
||||
os.remove(file)
|
||||
fh = logging.FileHandler(log_file, encoding='utf-8')
|
||||
fh = logging.FileHandler(log_file, encoding="utf-8")
|
||||
fh.setFormatter(logging.Formatter(log_format))
|
||||
|
||||
|
||||
def get_logger(name):
|
||||
try:
|
||||
fh.encoding = config.enc
|
||||
except NameError:
|
||||
fh.encoding = "utf-8"
|
||||
log = logging.getLogger(name=name)
|
||||
log.addHandler(fh)
|
||||
log.level = log_level
|
||||
|
||||
Reference in New Issue
Block a user