diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2013-03-22 07:32:31 +0000 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2013-03-22 07:36:17 +0000 |
| commit | c87e615bf98981219c2f92242f6ff9ee6753d786 (patch) | |
| tree | 27a4936dc5f223a47c39642364ac2a0b4c5a0fb3 /openstack/common/plugin/plugin.py | |
| parent | bf70726d4228ebf3e65aa75b8f0ca6cab5e1e159 (diff) | |
| download | oslo-c87e615bf98981219c2f92242f6ff9ee6753d786.tar.gz oslo-c87e615bf98981219c2f92242f6ff9ee6753d786.tar.xz oslo-c87e615bf98981219c2f92242f6ff9ee6753d786.zip | |
Gracefully handle errors in logging config files
Fixes bug #1154245
If the parameter to the --log-config option cannot be loaded by the
logging.config.fileConfig() function, you get an exception like this
raised:
NoSectionError: No section: 'formatters'
which doesn't do much to help users understand the error.
Improve the situation by wrapping the error in a custom exception type
giving this:
LogConfigError: Error loading logging config /etc/logging.conf: No section: 'formatters'
Also add some tests to check we raise this error under the most common
failure conditions.
Change-Id: I6ad2eb4867213b6356ce43d75da50218d1b498f6
Diffstat (limited to 'openstack/common/plugin/plugin.py')
0 files changed, 0 insertions, 0 deletions
