diff options
author | Thierry Carrez <thierry@openstack.org> | 2013-04-22 15:35:19 +0200 |
---|---|---|
committer | Thierry Carrez <thierry@openstack.org> | 2013-04-22 15:35:19 +0200 |
commit | 2f3c4c57c16ac86e550205d089082f8b72955f9e (patch) | |
tree | 35edf0dbe871478547f2345744c146c0a5e73099 /openstack/common/rootwrap | |
parent | 572bb9ddb720c7cf948906c72be30b022ded0df0 (diff) | |
download | oslo-2f3c4c57c16ac86e550205d089082f8b72955f9e.tar.gz oslo-2f3c4c57c16ac86e550205d089082f8b72955f9e.tar.xz oslo-2f3c4c57c16ac86e550205d089082f8b72955f9e.zip |
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
Diffstat (limited to 'openstack/common/rootwrap')
-rwxr-xr-x | openstack/common/rootwrap/cmd.py | 9 |
1 files changed, 3 insertions, 6 deletions
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)) |