Files
reflector/utils/log_utils.py
Gokul Mohanarangan d962ff1712 flake8 warnings fix
2023-07-11 14:06:20 +05:30

19 lines
426 B
Python

import loguru
class SingletonLogger:
__instance = None
@staticmethod
def get_logger():
"""
Create or return the singleton instance for the SingletonLogger class
:return: SingletonLogger instance
"""
if not SingletonLogger.__instance:
SingletonLogger.__instance = loguru.logger
return SingletonLogger.__instance
logger = SingletonLogger.get_logger()