mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-04-05 19:41:56 +08:00
Merge 4ebf87907d330740f4b2dfb5b515bddf5da1c604 into 9da7e17efe05041e31d3c3f42c8730ae890397f2
This commit is contained in:
commit
f25275d2a2
@ -319,13 +319,13 @@ def check_git_hash(model_dir):
|
|||||||
def get_logger(model_dir, filename="train.log"):
|
def get_logger(model_dir, filename="train.log"):
|
||||||
global logger
|
global logger
|
||||||
logger = logging.getLogger(os.path.basename(model_dir))
|
logger = logging.getLogger(os.path.basename(model_dir))
|
||||||
logger.setLevel(logging.ERROR)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
formatter = logging.Formatter("%(asctime)s\t%(name)s\t%(levelname)s\t%(message)s")
|
formatter = logging.Formatter("%(asctime)s\t%(name)s\t%(levelname)s\t%(message)s")
|
||||||
if not os.path.exists(model_dir):
|
if not os.path.exists(model_dir):
|
||||||
os.makedirs(model_dir)
|
os.makedirs(model_dir)
|
||||||
h = logging.FileHandler(os.path.join(model_dir, filename))
|
h = logging.FileHandler(os.path.join(model_dir, filename))
|
||||||
h.setLevel(logging.ERROR)
|
h.setLevel(logging.DEBUG)
|
||||||
h.setFormatter(formatter)
|
h.setFormatter(formatter)
|
||||||
logger.addHandler(h)
|
logger.addHandler(h)
|
||||||
return logger
|
return logger
|
||||||
|
Loading…
x
Reference in New Issue
Block a user