This commit is contained in:
parent
6828fe684d
commit
b6e6546bd7
@ -6,9 +6,8 @@ from .singleton import Singleton
|
||||
|
||||
class CustomLogger(Singleton):
|
||||
"""
|
||||
Singleton logger class that initializes a logger with a specified name and log file.
|
||||
It provides a method to log entry and exit of functions.
|
||||
|
||||
Singleton logger class that initializes a logger with a specified name
|
||||
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):
|
||||
@ -22,7 +21,8 @@ class CustomLogger(Singleton):
|
||||
self.logger.propagate = False
|
||||
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user