行数の制限
All checks were successful
Python Test / python-test (push) Successful in 10s

This commit is contained in:
ry.yamafuji 2025-12-05 00:52:51 +09:00
parent 6828fe684d
commit b6e6546bd7

View File

@ -6,9 +6,8 @@ from .singleton import Singleton
class CustomLogger(Singleton): class CustomLogger(Singleton):
""" """
Singleton logger class that initializes a logger with a specified name and log file. Singleton logger class that initializes a logger with a specified name
It provides a method to log entry and exit of functions. and log file.It provides a method to log entry and exit of functions.
""" """
def __init__(self, name="main", log_file=None, level=logging.INFO): def __init__(self, name="main", log_file=None, level=logging.INFO):
@ -22,7 +21,8 @@ class CustomLogger(Singleton):
self.logger.propagate = False self.logger.propagate = False
formatter = logging.Formatter( formatter = logging.Formatter(
"%(asctime)s %(levelname)s [%(filename)s:%(lineno)3d]: %(message)s" "%(asctime)s %(levelname)s "
"[%(filename)s:%(lineno)3d]: %(message)s"
) )
# Console handler # Console handler