Enhance logging format for better readability
Added timestamp with milliseconds, log level, and custom date format to improve clarity and make logs more useful for debugging. Change-Id: Ice2d601eddb54bbb0e7e3be6f03ba6db58256c1f
This commit is contained in:
parent
ee7fe59f7b
commit
8eaf4149b1
@ -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)
|
||||
|
||||
|
@ -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`.
|
Loading…
Reference in New Issue
Block a user