sync openstack-common log changes with nova
sync openstack-common log changes with nova

don't throw exceptions if %(color)s tag is used

fixes bug #1030078

If the log format strings include the %(color)s key in them and you
enable file logging, your log files won't work, and instead you'll
see exceptions on the console as the default python log handler doesn't
support that keyword.

This approach stubs out the extra keywords to be empty strings to avoid
the KeyError. Tests are also added to demonstrate the KeyError as defined
behavior, and test that color codes can be passed.

Change-Id: I24b2f45dd5a38b27b8cc5a70e0084d367e218172

iuliat/nova,rahulunair/nova,phenoxim/nova,tealover/nova,dawnpower/nova,CloudServer/nova,angdraug/nova,dstroppa/openstack-smartos-nova-grizzly,citrix-openstack-build/nova,tanglei528/nova,raildo/nova,BeyondTheClouds/nova,SUSE-Cloud/nova,akash1808/nova_test_latest,CCI-MOC/nova,Francis-Liu/animated-broccoli,gspilio/nova,vmturbo/nova,dims/nova,dstroppa/openstack-smartos-nova-grizzly,eharney/nova,aristanetworks/arista-ovs-nova,cyx1231st/nova,JianyuWang/nova,sacharya/nova,sridevikoushik31/openstack,gooddata/openstack-nova,shail2810/nova,cloudbau/nova,maoy/zknova,cloudbase/nova,maoy/zknova,houshengbo/nova_vmware_compute_driver,projectcalico/calico-nova,houshengbo/nova_vmware_compute_driver,badock/nova,maheshp/novatest,NewpTone/stacklab-nova,barnsnake351/nova,dstroppa/openstack-smartos-nova-grizzly,ted-gould/nova,thomasem/nova,devoid/nova,viggates/nova,tealover/nova,mikalstill/nova,berrange/nova,vmturbo/nova,MountainWei/nova,NeCTAR-RC/nova,ewindisch/nova,hanlind/nova,mmnelemane/nova,aristanetworks/arista-ovs-nova,sridevikoushik31/nova,whitepages/nova,citrix-openstack-build/nova,eayunstack/nova,ruslanloman/nova,sacharya/nova,jeffrey4l/nova,alvarolopez/nova,yrobla/nova,yrobla/nova,isyippee/nova,silenceli/nova,varunarya10/nova_test_latest,thomasem/nova,saleemjaveds/https-github.com-openstack-nova,ewindisch/nova,TieWei/nova,klmitch/nova,joker946/nova,CiscoSystems/nova,belmiromoreira/nova,berrange/nova,Yuriy-Leonov/nova,devendermishrajio/nova_test_latest,alaski/nova,apporc/nova,takeshineshiro/nova,JioCloud/nova,gspilio/nova,ntt-sic/nova,cernops/nova,Triv90/Nova,vladikr/nova_drafts,LoHChina/nova,Tehsmash/nova,alaski/nova,gooddata/openstack-nova,Tehsmash/nova,JioCloud/nova,eonpatapon/nova,CEG-FYP-OpenStack/scheduler,felixma/nova,qwefi/nova,leilihh/novaha,watonyweng/nova,rrader/nova-docker-plugin,redhat-openstack/nova,devendermishrajio/nova,TwinkleChawla/nova,virtualopensystems/nova,jianghuaw/nova,yosshy/nova,shahar-stratoscale/nova,hanlind/nova,sebrandon1/nova,rajalokan/nova,joker946/nova,phenoxim/nova,fnordahl/nova,Juniper/nova,JioCloud/nova_test_latest,eayunstack/nova,MountainWei/nova,rickerc/nova_audit,petrutlucian94/nova_dev,affo/nova,mahak/nova,orbitfp7/nova,double12gzh/nova,devendermishrajio/nova,openstack/nova,petrutlucian94/nova_dev,orbitfp7/nova,edulramirez/nova,devoid/nova,kimjaejoong/nova,zaina/nova,nikesh-mahalka/nova,savi-dev/nova,gspilio/nova,CloudServer/nova,affo/nova,jianghuaw/nova,yatinkumbhare/openstack-nova,scripnichenko/nova,virtualopensystems/nova,tanglei528/nova,leilihh/nova,houshengbo/nova_vmware_compute_driver,nikesh-mahalka/nova,angdraug/nova,fajoy/nova,rahulunair/nova,usc-isi/nova,sridevikoushik31/openstack,rrader/nova-docker-plugin,CiscoSystems/nova,yosshy/nova,mandeepdhami/nova,rajalokan/nova,bclau/nova,OpenAcademy-OpenStack/nova-scheduler,hanlind/nova,saleemjaveds/https-github.com-openstack-nova,zhimin711/nova,klmitch/nova,plumgrid/plumgrid-nova,CEG-FYP-OpenStack/scheduler,jianghuaw/nova,zaina/nova,alexandrucoman/vbox-nova-driver,Juniper/nova,sebrandon1/nova,maheshp/novatest,savi-dev/nova,JioCloud/nova_test_latest,adelina-t/nova,shootstar/novatest,bclau/nova,usc-isi/nova,belmiromoreira/nova,tudorvio/nova,Yuriy-Leonov/nova,NoBodyCam/TftpPxeBootBareMetal,NewpTone/stacklab-nova,mikalstill/nova,cloudbau/nova,tudorvio/nova,isyippee/nova,raildo/nova,fnordahl/nova,openstack/nova,paulmathews/nova,jeffrey4l/nova,TwinkleChawla/nova,watonyweng/nova,rickerc/nova_audit,zzicewind/nova,gooddata/openstack-nova,mahak/nova,tianweizhang/nova,varunarya10/nova_test_latest,leilihh/nova,cyx1231st/nova,dawnpower/nova,Juniper/nova,JianyuWang/nova,Yusuke1987/openstack_template,Francis-Liu/animated-broccoli,shail2810/nova,Metaswitch/calico-nova,paulmathews/nova,qwefi/nova,projectcalico/calico-nova,silenceli/nova,akash1808/nova,Metaswitch/calico-nova,fajoy/nova,maelnor/nova,cernops/nova,BeyondTheClouds/nova,bigswitch/nova,petrutlucian94/nova,zhimin711/nova,cernops/nova,mmnelemane/nova,NewpTone/stacklab-nova,redhat-openstack/nova,fajoy/nova,rahulunair/nova,eonpatapon/nova,spring-week-topos/nova-week,tangfeixiong/nova,sridevikoushik31/nova,vmturbo/nova,NoBodyCam/TftpPxeBootBareMetal,tangfeixiong/nova,gooddata/openstack-nova,ted-gould/nova,mgagne/nova,openstack/nova,Triv90/Nova,alexandrucoman/vbox-nova-driver,edulramirez/nova,imsplitbit/nova,ruslanloman/nova,LoHChina/nova,cloudbase/nova-virtualbox,aristanetworks/arista-ovs-nova,ntt-sic/nova,shootstar/novatest,savi-dev/nova,blueboxgroup/nova,spring-week-topos/nova-week,j-carpentier/nova,DirectXMan12/nova-hacking,barnsnake351/nova,bgxavier/nova,scripnichenko/nova,akash1808/nova,whitepages/nova,akash1808/nova_test_latest,zzicewind/nova,maelnor/nova,adelina-t/nova,kimjaejoong/nova,paulmathews/nova,usc-isi/nova,devendermishrajio/nova_test_latest,rajalokan/nova,iuliat/nova,bgxavier/nova,NeCTAR-RC/nova,viggates/nova,leilihh/novaha,noironetworks/nova,noironetworks/nova,cloudbase/nova,NoBodyCam/TftpPxeBootBareMetal,luogangyi/bcec-nova,CCI-MOC/nova,sebrandon1/nova,eharney/nova,mandeepdhami/nova,klmitch/nova,SUSE-Cloud/nova,dims/nova,badock/nova,jianghuaw/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,vmturbo/nova,klmitch/nova,double12gzh/nova,shahar-stratoscale/nova,maoy/zknova,blueboxgroup/nova,mgagne/nova,Stavitsky/nova,rajalokan/nova,luogangyi/bcec-nova,yatinkumbhare/openstack-nova,DirectXMan12/nova-hacking,imsplitbit/nova,apporc/nova,cloudbase/nova,petrutlucian94/nova,j-carpentier/nova,Juniper/nova,mikalstill/nova,Triv90/Nova,bigswitch/nova,cloudbase/nova-virtualbox,alvarolopez/nova,felixma/nova,sridevikoushik31/openstack,sridevikoushik31/nova,maheshp/novatest,BeyondTheClouds/nova,DirectXMan12/nova-hacking,Brocade-OpenSource/OpenStack-DNRM-Nova,Stavitsky/nova,TieWei/nova,vladikr/nova_drafts,plumgrid/plumgrid-nova,yrobla/nova,mahak/nova,sridevikoushik31/nova,tianweizhang/nova,takeshineshiro/nova,OpenAcademy-OpenStack/nova-scheduler,Yusuke1987/openstack_template