Add logging config to cinder.conf
Part of the effort to clean up the Cinder logs is to use the resource tag in the log format. We also want to have some consistency with other projects in how we do logging. This change adds the logging format to cinder.conf similar to what Nova and others use, and most importantly turns on the use of the resource tag that's in olso_log. We're slowly cleaning up the logging in Cinder by doing things like replacing "Delete volume %(volume_id)s compoleted" with ("Delete volume completed successfully.", resource=volume) It woudl be good to have these picked up as we transition so we're not missing info. Also, there's sure to be cases where "volume" isn't a valid dbref and we find issues that need fixed. Change-Id: I193637fea14d97183f6a9782f37d8edcf929e0c4
This commit is contained in:
parent
e52cfc5524
commit
95b994d548
@ -264,6 +264,9 @@ function configure_cinder {
|
||||
# Format logging
|
||||
if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then
|
||||
setup_colorized_logging $CINDER_CONF DEFAULT "project_id" "user_id"
|
||||
else
|
||||
# Set req-id, project-name and resource in log format
|
||||
iniset $CINDER_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)03d %(levelname)s %(name)s [%(request_id)s %(project_name)s] %(resource)s%(message)s"
|
||||
fi
|
||||
|
||||
if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user