diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index 82e2e45890..bd2747536c 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -26,7 +26,11 @@ import sys # TODO(rhallisey): add docstring. -logging.basicConfig() +logging.basicConfig( + format='%(asctime)s.%(msecs)03d %(levelname)s %(message)s', + level=logging.INFO, + datefmt='%Y-%m-%d %H:%M:%S' +) LOG = logging.getLogger(__name__) LOG.setLevel(logging.INFO) diff --git a/releasenotes/notes/kolla-container-logformat-259885637cbeb0e6.yaml b/releasenotes/notes/kolla-container-logformat-259885637cbeb0e6.yaml new file mode 100644 index 0000000000..c8056184b7 --- /dev/null +++ b/releasenotes/notes/kolla-container-logformat-259885637cbeb0e6.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + Improves logging format of kolla containers by adding + timestamps with milliseconds, log levels, and a custom + date format. +upgrade: + - | + Users who parse Docker container logs should take into account + that for example `INFO:__main__:Validating config file` is now + `YYYY-MM-DD HH:MM:SS.fff INFO Validating config file`.