summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/__init__.py
diff options
context:
space:
mode:
authorAbhijit Menon-Sen <ams@2ndQuadrant.com>2016-08-26 20:25:44 +0530
committerAbhijit Menon-Sen <ams@2ndQuadrant.com>2016-08-26 20:28:58 +0530
commitb4a035718ebb3fc7df0f932b2423d7533a1ddfca (patch)
treead9d8534176c12414cf63c80d710f0a736165555 /lib/ansible/plugins/__init__.py
parent238cccf1668579a12c3b80ef9baa27f432accb65 (diff)
downloadansible-b4a035718ebb3fc7df0f932b2423d7533a1ddfca.tar.gz
Make _display_plugin_load much less noisy
There was general consensus that displaying every plugin load on -vvv was *way* too noisy. This commit reformats the log message to be less verbose, and drops it down to debugging-only level.
Diffstat (limited to 'lib/ansible/plugins/__init__.py')
-rw-r--r--lib/ansible/plugins/__init__.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/ansible/plugins/__init__.py b/lib/ansible/plugins/__init__.py
index 5472486730..85e5c2c2a3 100644
--- a/lib/ansible/plugins/__init__.py
+++ b/lib/ansible/plugins/__init__.py
@@ -357,16 +357,15 @@ class PluginLoader:
return obj
def _display_plugin_load(self, class_name, name, searched_paths, path, found_in_cache=None, class_only=None):
- searched_msg = 'Searching for plugin type %s named \'%s\' in paths: %s' % (class_name, name, self.format_paths(searched_paths))
- loading_msg = 'Loading plugin type %s named \'%s\' from %s' % (class_name, name, path)
+ msg = 'Loading %s \'%s\' from %s' % (class_name, os.path.basename(name), path)
+
+ if len(searched_paths) > 1:
+ msg = '%s (searched paths: %s)' % (msg, self.format_paths(searched_paths))
if found_in_cache or class_only:
- extra_msg = 'found_in_cache=%s, class_only=%s' % (found_in_cache, class_only)
- display.debug('%s %s' % (searched_msg, extra_msg))
- display.debug('%s %s' % (loading_msg, extra_msg))
- else:
- display.vvvv(searched_msg)
- display.vvv(loading_msg)
+ msg = '%s (found_in_cache=%s, class_only=%s)' % (msg, found_in_cache, class_only)
+
+ display.debug(msg)
def all(self, *args, **kwargs):
''' instantiates all plugins with the same arguments '''