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="{time:MM-DD HH:mm:ss} |{level:^8}| {file}:{line} | {message}",
backtrace=True,
diagnose=True,
)