mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-02 04:04:23 -07:00
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.
This commit is contained in:
parent
238cccf166
commit
b4a035718e
1 changed files with 7 additions and 8 deletions
|
@ -357,16 +357,15 @@ class PluginLoader:
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def _display_plugin_load(self, class_name, name, searched_paths, path, found_in_cache=None, class_only=None):
|
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))
|
msg = 'Loading %s \'%s\' from %s' % (class_name, os.path.basename(name), path)
|
||||||
loading_msg = 'Loading plugin type %s named \'%s\' from %s' % (class_name, 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:
|
if found_in_cache or class_only:
|
||||||
extra_msg = 'found_in_cache=%s, class_only=%s' % (found_in_cache, class_only)
|
msg = '%s (found_in_cache=%s, class_only=%s)' % (msg, found_in_cache, class_only)
|
||||||
display.debug('%s %s' % (searched_msg, extra_msg))
|
|
||||||
display.debug('%s %s' % (loading_msg, extra_msg))
|
display.debug(msg)
|
||||||
else:
|
|
||||||
display.vvvv(searched_msg)
|
|
||||||
display.vvv(loading_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 '''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue