The goal of this blueprint is to make it easier to adjust the format of the user_identity field in the log line without having to specify the full log format string.
Since oslo.context is not using oslo.config, and is incorrectly enforcing formatting, we want to make this change to oslo.log.
Let oslo.log control the formatting for the user_identity value in the log output. We have to leave the value in place in oslo.context, but we don’t have to use it any more.
Add a new configuration option to specify how to format the user_identity field. (We might find it useful to do this for other fields in the future, too, but let’s focus on one for now.)
Update oslo.log so it asks oslo.context for the values, and then replaces the user_identity with a string it builds itself using values it gets from oslo.context and the format string it gets from its configuration option.
We could require anyone wanting to customize the log format to replace the entire format string, but that makes it a little harder to adjust just part of it as we standardize the overall structure of the log messages.
We could place the configuration option in oslo.context, but that library is not using oslo.config yet and it should not have log formatting logic embedded in it.
None. The RequestContext from oslo.context will still need to provide user_identity for backwards compatibility.
The result will be no more or less secure than before.
One extra format call should not have a big performance impact.
One new configuration option, with the default set up to result in the same format we have now.
Users of devstack will eventually be able to see user identity in a nicer format.
No significant change.
Primary assignee: doug-hellmann
Other contributors: ihrachyshka
Target Milestone for completion: liberty-3
The new configuration option needs to be documented.
This work is licensed under a Creative Commons Attribution 3.0 Unported License. http://creativecommons.org/licenses/by/3.0/legalcode