diff options
| author | Jason Kölker <jason@koelker.net> | 2012-02-13 16:26:31 -0600 |
|---|---|---|
| committer | Jason Kölker <jason@koelker.net> | 2012-02-17 11:24:32 -0600 |
| commit | 2f317ba79f262a8cd325844a1a258efab22e5fa1 (patch) | |
| tree | 8aae34b0df7504f0cff796a9c3bcb3a1547d80e5 /nova/utils.py | |
| parent | 676965280136407c9f69072e6fa468e9e2ea14eb (diff) | |
| download | nova-2f317ba79f262a8cd325844a1a258efab22e5fa1.tar.gz nova-2f317ba79f262a8cd325844a1a258efab22e5fa1.tar.xz nova-2f317ba79f262a8cd325844a1a258efab22e5fa1.zip | |
Allow file logging config
* Fixes lp904305
* remove module level log functions (getLogger to rule them all)
* Move specific Environment logging to the one place it is used
* Wrap getLogger to return a logger wrapped in a NovaContextAdapter
* Do not overwrite the root logger
* save_and_reraise_exception logs via error for passing exc_info
* Uses CommonConfigOptions for compatability across Openstack Projects
* Prefers CommonConfigOptions over legacy options
* Install a NullHandler on the root logger if configured by FLAGS
* Include example logging config file to mimic Nova defaults
Change-Id: Ie59c3f755c142e2b7dc3b94b4e82e142e157bfac
Diffstat (limited to 'nova/utils.py')
| -rw-r--r-- | nova/utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/utils.py b/nova/utils.py index 0af09e809..96f0a57f0 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -1118,8 +1118,10 @@ def save_and_reraise_exception(): try: yield except Exception: - LOG.exception(_('Original exception being dropped'), - exc_info=(type_, value, traceback)) + # NOTE(jkoelker): Using LOG.error here since it accepts exc_info + # as a kwargs. + LOG.error(_('Original exception being dropped'), + exc_info=(type_, value, traceback)) raise raise type_, value, traceback |
