summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/log.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/log.py b/nova/log.py
index ec6681edd..90c40cca7 100644
--- a/nova/log.py
+++ b/nova/log.py
@@ -112,9 +112,11 @@ def _dictify_context(context):
context = context.to_dict()
return context
+
def _get_binary_name():
return os.path.basename(inspect.stack()[-1][1])
+
def get_log_file_path(binary=None):
if FLAGS.logfile:
return FLAGS.logfile
@@ -122,6 +124,7 @@ def get_log_file_path(binary=None):
binary = binary or _get_binary_name()
return '%s.log' % (os.path.join(FLAGS.logdir, binary),)
+
def basicConfig():
logging.basicConfig()
for handler in logging.root.handlers: