runabot/RUNA/Modules/Logging.py
tmddn3070 6693186d40 FEAT: Inital commit
This Commit Contained Rebrand Patches
2024-03-17 09:42:36 +09:00

21 lines
532 B
Python

import loguru
class Logging:
def __init__(self):
self.logger = loguru.logger
self.logger.add("Logs/Latest.log", rotation="1 day", retention="7 days", level="DEBUG",
format="{time} {level} {message}")
def error(self, message: str):
self.logger.error(message)
def warning(self, message: str):
self.logger.warning(message)
def info(self, message: str):
self.logger.info(message)
def debug(self, message: str):
self.logger.debug(message)