Merge branch 'master' into chore-update-msg-hash-format

This commit is contained in:
gabrielmer 2025-01-31 11:27:57 +02:00 committed by GitHub
commit 53d8536ec6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -3,8 +3,8 @@ addopts = -s --instafail --tb=short --color=auto
log_level = DEBUG
log_cli = True
log_file = log/test.log
log_cli_format = %(asctime)s %(name)s %(levelname)s %(message)s
log_file_format = %(asctime)s %(name)s %(levelname)s %(message)s
log_cli_format = %(asctime)s.%(msecs)03d %(levelname)s [%(name)s] %(message)s
log_file_format = %(asctime)s.%(msecs)03d %(levelname)s [%(name)s] %(message)s
timeout = 300
markers =
smoke: marks tests as smoke test (deselect with '-m "not smoke"')

View File

@ -21,4 +21,11 @@ def get_custom_logger(name):
logging.getLogger("docker").setLevel(logging.WARNING)
logger = logging.getLogger(name)
logger.addFilter(log_length_filter(max_log_line_length))
# Define a formatter with millisecond precision
ch = logging.StreamHandler()
formatter = logging.Formatter("%(asctime)s.%(msecs)03d %(levelname)s [%(name)s] %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
ch.setFormatter(formatter)
logger.addHandler(ch)
return logger