os_vif: add logging for each plugin that is loaded

When debugging problems it is helpful to know which plugins
have been loaded. Ensure this is reported by emitting info
in a log message at load time.

Change-Id: Id6442c8aa2004aeb3fc9b25bfc4c9b8baa5a1e56
This commit is contained in:
Daniel P. Berrange 2016-06-08 09:07:59 +00:00
parent 8b72ece159
commit d78a33ee90
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,7 @@ _LE = os_vif.i18n._LE
_LI = os_vif.i18n._LI
_EXT_MANAGER = None
LOG = logging.getLogger('os_vif')
LOG = logging.getLogger(__name__)
def initialize(reset=False):
@ -43,6 +43,8 @@ def initialize(reset=False):
for plugin_name in _EXT_MANAGER.names():
cls = _EXT_MANAGER[plugin_name].plugin
obj = cls.load(plugin_name)
LOG.info("Loaded VIF plugin class '%s' with name '%s'",
cls, plugin_name)
_EXT_MANAGER[plugin_name].obj = obj