[oslo][ops] Change in default logging format
Stephen Finucane
stephenfin at redhat.com
Tue Apr 26 11:10:58 UTC 2022
I'm not sure how many people read release notes for the various oslo libraries,
so I'm posting this here since it might have a minor impact for some tooling
operators are using.
We've just merged [1] which changes the default logging format used by oslo.log,
configured using the '[DEFAULT] logging_context_format_string' config option.
Previously, our logging format was:
%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s
This looks like e.g.
2022-04-26 10:49:14.629 4187413 WARNING nova.conductor.api [req-ffddccd3-8804-4fc3-a2f3-a05af1eb569f - - - - -]
This has now been modified to include the global request ID as well as the local
request ID:
%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(global_request_id)s %(request_id)s %(user_identity)s] %(instance)s%(message)s
This looks like e.g.:
2022-04-26 10:53:16.756 4187784 DEBUG nova.service [None req-f1698728-a2d6-4e02-a6b4-cf2cd398c02f - - - - -] Join ServiceGroup membership for this service compute
This will affect pretty much all services using the out-of-the-box logging
configuration. However, I suspect very few if any users are using the standard
configuration. DevStack overrides '[DEFAULT] logging_context_format_string' for
all services [2] and I suspect other installers probably do the same. If you are
using the standard configuration, you might need to modify some log
parsing/scraping tooling when this rolls around or manually set '[DEFAULT]
logging_context_format_string' in your service configuration files.
Cheers,
Stephen
[1] https://review.opendev.org/c/openstack/oslo.log/+/838190
[2] https://github.com/openstack/devstack/blob/3b0c035b9/functions#L677-L707
More information about the openstack-discuss
mailing list