diff --git a/platypush/backend/__init__.py b/platypush/backend/__init__.py index 1e07403306..f7dc225b75 100644 --- a/platypush/backend/__init__.py +++ b/platypush/backend/__init__.py @@ -34,7 +34,7 @@ class Backend(Thread): self.thread_id = None self._stop = False self._kwargs = kwargs - self.logger = logging.getLogger(__name__) + self.logger = logging.getLogger(self.__class__.__name__) # Internal-only, we set the request context on a backend if that # backend is intended to react for a response to a specific request diff --git a/platypush/plugins/__init__.py b/platypush/plugins/__init__.py index f20d9eaca1..e5df9d73ab 100644 --- a/platypush/plugins/__init__.py +++ b/platypush/plugins/__init__.py @@ -9,7 +9,7 @@ class Plugin(object): """ Base plugin class """ def __init__(self, **kwargs): - self.logger = logging.getLogger(__name__) + self.logger = logging.getLogger(self.__class__.__name__) if 'logging' in kwargs: self.logger.setLevel(getattr(logging, kwargs['logging'].upper()))