OliveSensorAPI/scripts/qa_generation/util/logger.py
2024-03-07 17:56:07 +08:00

15 lines
280 B
Python

from loguru import logger
from config.config import log_file_path
def get_logger():
return logger
logger.add(log_file_path, rotation="500 MB")
logger.configure(
handlers=[
dict(sink=log_file_path, rotation="500 MB", format="{time} {level} {message}"),
]
)