From 2f3c4c57c16ac86e550205d089082f8b72955f9e Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Mon, 22 Apr 2013 15:35:19 +0200 Subject: Revert common logging use in rootwrap Revert recent plug of common logging into rootwrap, as it breaks rootwrap logging. Rootwrap does not make use of oslo logging and oslo config in order to reduce the surface of code run as root. See https://review.openstack.org/#/c/26468/ for discussion. Change-Id: I276ade164a902d091f9aafab79bbd4cc189588eb --- openstack/common/rootwrap/cmd.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'openstack') diff --git a/openstack/common/rootwrap/cmd.py b/openstack/common/rootwrap/cmd.py index 23986ac..92552f1 100755 --- a/openstack/common/rootwrap/cmd.py +++ b/openstack/common/rootwrap/cmd.py @@ -34,16 +34,13 @@ """ 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 @@ -60,7 +57,7 @@ def _subprocess_setup(): def _exit_error(execname, message, errorcode, log=True): print "%s: %s" % (execname, message) if log: - LOG.error(message) + logging.error(message) sys.exit(errorcode) @@ -107,7 +104,7 @@ def main(): command = filtermatch.get_command(userargs, exec_dirs=config.exec_dirs) if config.use_syslog: - LOG.info("(%s > %s) Executing %s (filter match = %s)" % ( + logging.info("(%s > %s) Executing %s (filter match = %s)" % ( os.getlogin(), pwd.getpwuid(os.getuid())[0], command, filtermatch.name)) -- cgit