mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-01-02 14:03:08 +00:00
custom_logger.py: add millisecond precision
This commit is contained in:
parent
12a9ec96ca
commit
33a104d8b0
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user