This commit is contained in:
Marc Beninca 2024-09-17 22:22:03 +02:00
parent e9d228ba2c
commit 149ed2dc3b
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -5,7 +5,12 @@ import sys
def get_file_logger(name: str) -> logging.Logger:
"""Return a file logger."""
"""Return a file logger.
:param name: arbitrary name
:type name: str
:rtype: logging.Logger
"""
# formatter
items = [
"%(name)s: %(asctime)s",
@ -27,7 +32,12 @@ def get_file_logger(name: str) -> logging.Logger:
def get_stream_logger(level: int) -> logging.Logger:
"""Return a stream logger."""
"""Return a stream logger.
:param level: filtering level
:type level: int
:rtype: logging.Logger
"""
# handler
out_handler = logging.StreamHandler(stream=sys.stdout)
out_handler.setLevel(level)