summaryrefslogtreecommitdiffstats
path: root/openstack/common/rootwrap/cmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstack/common/rootwrap/cmd.py')
-rwxr-xr-xopenstack/common/rootwrap/cmd.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/openstack/common/rootwrap/cmd.py b/openstack/common/rootwrap/cmd.py
index 92552f1..23986ac 100755
--- a/openstack/common/rootwrap/cmd.py
+++ b/openstack/common/rootwrap/cmd.py
@@ -34,13 +34,16 @@
"""
import ConfigParser
-import logging
import os
import pwd
import signal
import subprocess
import sys
+from openstack.common import log as logging
+
+
+LOG = logging.getLogger(__name__)
RC_UNAUTHORIZED = 99
RC_NOCOMMAND = 98
@@ -57,7 +60,7 @@ def _subprocess_setup():
def _exit_error(execname, message, errorcode, log=True):
print "%s: %s" % (execname, message)
if log:
- logging.error(message)
+ LOG.error(message)
sys.exit(errorcode)
@@ -104,7 +107,7 @@ def main():
command = filtermatch.get_command(userargs,
exec_dirs=config.exec_dirs)
if config.use_syslog:
- logging.info("(%s > %s) Executing %s (filter match = %s)" % (
+ LOG.info("(%s > %s) Executing %s (filter match = %s)" % (
os.getlogin(), pwd.getpwuid(os.getuid())[0],
command, filtermatch.name))