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, 5 insertions, 4 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index b6ba73255..6b2c6f7d0 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -365,10 +365,11 @@ class API(DictProxy):
self.env._finalize_core(**dict(DEFAULT_CONFIG))
log = logging.getLogger()
object.__setattr__(self, 'log', log)
- if self.env.debug:
- log.setLevel(logging.DEBUG)
- else:
- log.setLevel(logging.INFO)
+ if log.level == logging.NOTSET:
+ if self.env.debug:
+ log.setLevel(logging.DEBUG)
+ else:
+ log.setLevel(logging.INFO)
# Add stderr handler:
stderr = logging.StreamHandler()