Refactor: rewrote Japanese natural language processing code imported from server_editor.py
The logic has not been changed, only renaming, splitting and moving modules on a per-function basis. Existing code will be left in place for the time being to avoid breaking the training code, which is not subject to refactoring this time.
This commit is contained in:
15
style_bert_vits2/logging.py
Normal file
15
style_bert_vits2/logging.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from loguru import logger
|
||||
|
||||
from style_bert_vits2.utils.stdout_wrapper import SAFE_STDOUT
|
||||
|
||||
|
||||
# Remove all default handlers
|
||||
logger.remove()
|
||||
|
||||
# Add a new handler
|
||||
logger.add(
|
||||
SAFE_STDOUT,
|
||||
format = "<g>{time:MM-DD HH:mm:ss}</g> |<lvl>{level:^8}</lvl>| {file}:{line} | {message}",
|
||||
backtrace = True,
|
||||
diagnose = True,
|
||||
)
|
||||
Reference in New Issue
Block a user