Coverage for app/ddd/infrastructure/log/logger.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-15 01:44 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-15 01:44 +0000
1from logging import DEBUG, Formatter, StreamHandler, getLogger
3# import coloredlogs
5fmt = "%(asctime)s %(name)s:%(lineno)s %(funcName)s [%(levelname)s]: %(message)s"
6handler_format = Formatter(fmt)
8stream_handler = StreamHandler()
9stream_handler.setFormatter(handler_format)
11logger = getLogger("main")
12logger.setLevel(DEBUG)
13logger.addHandler(stream_handler)
15# coloredlogs.install(
16# level='DEBUG',
17# logger=logger,
18# fmt=fmt,
19# # datefmt='%Y/%m/%d %H:%M:%S'
20# )