Revert "Add log_only to debug messages (#25545)"

This reverts commit 9e8cc26720.
pull/20717/head
Brian Coca 8 years ago
parent 00d5de3dec
commit 498aea8acc

@ -290,7 +290,7 @@ def main():
sys.stderr.write(traceback.format_exc()) sys.stderr.write(traceback.format_exc())
sys.exit("FAIL: %s" % e) sys.exit("FAIL: %s" % e)
ssh = connection_loader.get('ssh', class_only=True, log_only=True) ssh = connection_loader.get('ssh', class_only=True)
cp = ssh._create_control_path(pc.remote_addr, pc.connection, pc.remote_user) cp = ssh._create_control_path(pc.remote_addr, pc.connection, pc.remote_user)
# create the persistent connection dir if need be and create the paths # create the persistent connection dir if need be and create the paths

@ -343,7 +343,6 @@ class PluginLoader:
found_in_cache = True found_in_cache = True
class_only = kwargs.pop('class_only', False) class_only = kwargs.pop('class_only', False)
log_only = kwargs.pop('log_only', False)
if name in self.aliases: if name in self.aliases:
name = self.aliases[name] name = self.aliases[name]
path = self.find_plugin(name) path = self.find_plugin(name)
@ -368,7 +367,7 @@ class PluginLoader:
return None return None
self._display_plugin_load(self.class_name, name, self._searched_paths, path, self._display_plugin_load(self.class_name, name, self._searched_paths, path,
found_in_cache=found_in_cache, class_only=class_only, log_only=log_only) found_in_cache=found_in_cache, class_only=class_only)
if not class_only: if not class_only:
try: try:
obj = obj(*args, **kwargs) obj = obj(*args, **kwargs)
@ -384,7 +383,7 @@ class PluginLoader:
setattr(obj, '_load_name', name) setattr(obj, '_load_name', name)
return obj return obj
def _display_plugin_load(self, class_name, name, searched_paths, path, found_in_cache=None, class_only=None, log_only=False): def _display_plugin_load(self, class_name, name, searched_paths, path, found_in_cache=None, class_only=None):
msg = 'Loading %s \'%s\' from %s' % (class_name, os.path.basename(name), path) msg = 'Loading %s \'%s\' from %s' % (class_name, os.path.basename(name), path)
if len(searched_paths) > 1: if len(searched_paths) > 1:
@ -393,7 +392,7 @@ class PluginLoader:
if found_in_cache or class_only: if found_in_cache or class_only:
msg = '%s (found_in_cache=%s, class_only=%s)' % (msg, found_in_cache, class_only) msg = '%s (found_in_cache=%s, class_only=%s)' % (msg, found_in_cache, class_only)
display.debug(msg, log_only) display.debug(msg)
def all(self, *args, **kwargs): def all(self, *args, **kwargs):
''' instantiates all plugins with the same arguments ''' ''' instantiates all plugins with the same arguments '''

@ -174,9 +174,9 @@ class Display:
def vvvvvv(self, msg, host=None): def vvvvvv(self, msg, host=None):
return self.verbose(msg, host=host, caplevel=5) return self.verbose(msg, host=host, caplevel=5)
def debug(self, msg, log_only=False): def debug(self, msg):
if C.DEFAULT_DEBUG: if C.DEFAULT_DEBUG:
self.display("%6d %0.5f: %s" % (os.getpid(), time.time(), msg), color=C.COLOR_DEBUG, log_only=log_only) self.display("%6d %0.5f: %s" % (os.getpid(), time.time(), msg), color=C.COLOR_DEBUG)
def verbose(self, msg, host=None, caplevel=2): def verbose(self, msg, host=None, caplevel=2):
if self.verbosity > caplevel: if self.verbosity > caplevel:

Loading…
Cancel
Save