summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index f3b35d30b..019386c37 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -263,8 +263,13 @@ class Plugin(ReadOnly):
self.summary = '<%s>' % self.fullname
else:
self.summary = self.doc.split('\n\n', 1)[0]
- log = logging.getLogger('ipa')
- for name in ('debug', 'info', 'warning', 'error', 'critical'):
+ log = logging.getLogger(self.fullname)
+ for name in ('debug', 'info', 'warning', 'error', 'critical', 'exception'):
+ if hasattr(self, name):
+ raise StandardError(
+ '%s.%s attribute (%r) conflicts with Plugin logger' % (
+ self.name, name, getattr(self, name))
+ )
setattr(self, name, getattr(log, name))
def __get_api(self):