Logging: change text loggers to log current time

This commit is contained in:
Fabian Dill 2022-04-20 18:57:29 +02:00 committed by Fabian Dill
parent 1afacd28a1
commit acd7bce903
1 changed files with 1 additions and 1 deletions

View File

@ -417,7 +417,7 @@ loglevel_mapping = {'error': logging.ERROR, 'info': logging.INFO, 'warning': log
def init_logging(name: str, loglevel: typing.Union[str, int] = logging.INFO, write_mode: str = "w",
log_format: str = "[%(name)s]: %(message)s", exception_logger: str = ""):
log_format: str = "[%(name)s at %(asctime)s]: %(message)s", exception_logger: str = ""):
loglevel: int = loglevel_mapping.get(loglevel, loglevel)
log_folder = user_path("logs")
os.makedirs(log_folder, exist_ok=True)