Fix the keyerror:"tenant_name" when writing log

The name "tenant_name" should be changed to "project_name" on the
config item "logging_context_format_string" in the file
"/etc/smaug/smaug.conf". Otherwise, keyerror:"tenant_name" will
happen when writing log, because there is not a item named
"tenant_name" in the parameter "record.__dict__" when executing
the code "self._fmt % record.__dict__".

Closes-Bug: #1527037
Change-Id:  Ic70d1c18d43f75ea3ead4a1003ffeba39b39b846
This commit is contained in:
zengchen 2015-12-17 15:11:56 +08:00
parent bda35bb321
commit 2d5c24fd3d
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ function configure_smaug_api {
echo "Configuring Smaug API Database"
iniset $SMAUG_API_CONF database connection `database_connection_url smaug`
setup_colorized_logging $SMAUG_API_CONF DEFAULT tenant_name
setup_colorized_logging $SMAUG_API_CONF DEFAULT
echo "Configuring Smaug API colorized"
if is_service_enabled keystone; then