summaryrefslogtreecommitdiff
path: root/nova/__init__.py
diff options
context:
space:
mode:
authorJason Kölker <jason@koelker.net>2012-02-13 16:26:31 -0600
committerJason Kölker <jason@koelker.net>2012-02-17 11:24:32 -0600
commit2f317ba79f262a8cd325844a1a258efab22e5fa1 (patch)
tree8aae34b0df7504f0cff796a9c3bcb3a1547d80e5 /nova/__init__.py
parent676965280136407c9f69072e6fa468e9e2ea14eb (diff)
downloadnova-2f317ba79f262a8cd325844a1a258efab22e5fa1.tar.gz
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/__init__.py')
-rw-r--r--nova/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/__init__.py b/nova/__init__.py
index f2e9684d30..00ee99c375 100644
--- a/nova/__init__.py
+++ b/nova/__init__.py
@@ -32,6 +32,11 @@
"""
import gettext
+import logging
-gettext.install("nova", unicode=1)
+gettext.install('nova', unicode=1)
+# NOTE(jkoelker) This configures the root logger if it is not already
+# configured so messages from logging setup can be written
+# to the console
+logging.basicConfig(format='%(message)s')