From cbb5964500525dbf62b01e71f587e6adee255525 Mon Sep 17 00:00:00 2001 From: Jeff Newman Date: Wed, 24 Apr 2024 21:35:33 -0500 Subject: [PATCH] elapsed time format logging --- configs/resident/logging.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configs/resident/logging.yaml b/configs/resident/logging.yaml index b422d52..0a7df5d 100644 --- a/configs/resident/logging.yaml +++ b/configs/resident/logging.yaml @@ -37,7 +37,7 @@ logging: console: class: logging.StreamHandler stream: ext://sys.stdout - formatter: simpleFormatter + formatter: elapsedFormatter level: INFO formatters: @@ -53,3 +53,7 @@ logging: format: '%(asctime)s - %(levelname)s - %(name)s - %(message)s' datefmt: '%d/%m/%Y %H:%M:%S' + elapsedFormatter: + (): activitysim.core.tracing.ElapsedTimeFormatter + format: '[{elapsedTime}] {levelname:s}: {message:s}' + style: '{'