mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 16:15:42 +02:00
logger = logging.getLogger(__name__)
This commit is contained in:
@@ -10,6 +10,9 @@ from letsencrypt import errors
|
||||
from letsencrypt import interfaces
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PluginEntryPoint(object):
|
||||
"""Plugin entry point."""
|
||||
|
||||
@@ -70,7 +73,7 @@ class PluginEntryPoint(object):
|
||||
zope.interface.verify.verifyObject(iface, self.init())
|
||||
except zope.interface.exceptions.BrokenImplementation:
|
||||
if iface.implementedBy(self.plugin_cls):
|
||||
logging.debug(
|
||||
logger.debug(
|
||||
"%s implements %s but object does "
|
||||
"not verify", self.plugin_cls, iface.__name__)
|
||||
return False
|
||||
@@ -80,7 +83,7 @@ class PluginEntryPoint(object):
|
||||
def prepared(self):
|
||||
"""Has the plugin been prepared already?"""
|
||||
if not self.initialized:
|
||||
logging.debug(".prepared called on uninitialized %r", self)
|
||||
logger.debug(".prepared called on uninitialized %r", self)
|
||||
return self._prepared is not None
|
||||
|
||||
def prepare(self):
|
||||
@@ -90,10 +93,10 @@ class PluginEntryPoint(object):
|
||||
try:
|
||||
self._initialized.prepare()
|
||||
except errors.MisconfigurationError as error:
|
||||
logging.debug("Misconfigured %r: %s", self, error)
|
||||
logger.debug("Misconfigured %r: %s", self, error)
|
||||
self._prepared = error
|
||||
except errors.NoInstallationError as error:
|
||||
logging.debug("No installation (%r): %s", self, error)
|
||||
logger.debug("No installation (%r): %s", self, error)
|
||||
self._prepared = error
|
||||
else:
|
||||
self._prepared = True
|
||||
@@ -149,7 +152,7 @@ class PluginsRegistry(collections.Mapping):
|
||||
if interfaces.IPluginFactory.providedBy(plugin_ep.plugin_cls):
|
||||
plugins[plugin_ep.name] = plugin_ep
|
||||
else: # pragma: no cover
|
||||
logging.warning(
|
||||
logger.warning(
|
||||
"%r does not provide IPluginFactory, skipping", plugin_ep)
|
||||
return cls(plugins)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user