diff options
| author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-02-14 18:54:32 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-04 10:42:29 +0000 |
| commit | cdd6675951b74075c9b9159f7465a88f83775bac (patch) | |
| tree | 77ddf864974970466bb0463b323c7d96a2c6b0fe /scripts/lib/wic/plugin.py | |
| parent | f7d9e33aa129d8ab98dd1971154c29c275d103b0 (diff) | |
| download | openembedded-core-cdd6675951b74075c9b9159f7465a88f83775bac.tar.gz openembedded-core-cdd6675951b74075c9b9159f7465a88f83775bac.tar.bz2 openembedded-core-cdd6675951b74075c9b9159f7465a88f83775bac.zip | |
wic: use wic logger in core modules
Replaced msger with wic logger in the core wic modules.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Diffstat (limited to 'scripts/lib/wic/plugin.py')
| -rw-r--r-- | scripts/lib/wic/plugin.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py index f04a0343d9..70d337789f 100644 --- a/scripts/lib/wic/plugin.py +++ b/scripts/lib/wic/plugin.py @@ -17,8 +17,8 @@ import os import sys +import logging -from wic import msger from wic import pluginbase from wic.utils import errors from wic.utils.misc import get_bitbake_var @@ -30,6 +30,8 @@ PLUGIN_TYPES = ["imager", "source"] PLUGIN_DIR = "/lib/wic/plugins" # relative to scripts SCRIPTS_PLUGIN_DIR = "scripts" + PLUGIN_DIR +logger = logging.getLogger('wic') + class PluginMgr(): plugin_dirs = {} @@ -91,17 +93,16 @@ class PluginMgr(): if mod and mod != '__init__': if mod in sys.modules: #self.plugin_dirs[pdir] = True - msger.warning("Module %s already exists, skip" % mod) + logger.warning("Module %s already exists, skip", mod) else: try: pymod = __import__(mod) self.plugin_dirs[pdir] = True - msger.debug("Plugin module %s:%s imported"\ - % (mod, pymod.__file__)) + logger.debug("Plugin module %s:%s imported", + mod, pymod.__file__) except ImportError as err: - msg = 'Failed to load plugin %s/%s: %s' \ - % (os.path.basename(pdir), mod, err) - msger.warning(msg) + logger.warning('Failed to load plugin %s/%s: %s', + os.path.basename(pdir), mod, err) del sys.path[0] @@ -140,8 +141,8 @@ class PluginMgr(): if _source_name == source_name: for _method_name in methods: if not hasattr(klass, _method_name): - msger.warning("Unimplemented %s source interface for: %s"\ - % (_method_name, _source_name)) + logger.warning("Unimplemented %s source interface for: %s", + _method_name, _source_name) return None func = getattr(klass, _method_name) methods[_method_name] = func |
