From 29706fb13ba99b4309c2004668e952d997f25d5f Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 11 Feb 2011 17:24:20 -0500 Subject: Add default success/failure output logging. Request logging on the server only happened if you added verbose=True or debug=True to the IPA config file. We should log the basics at least: who, what, result. Move a lot of entries from info to debug logging as well. Related to ticket 873 --- ipalib/plugable.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ipalib/plugable.py') diff --git a/ipalib/plugable.py b/ipalib/plugable.py index a7e61ddb..723414ce 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -409,10 +409,14 @@ class API(DictProxy): stderr = logging.StreamHandler() if self.env.debug: stderr.setLevel(logging.DEBUG) - elif self.env.verbose > 0: - stderr.setLevel(logging.INFO) else: - stderr.setLevel(logging.WARNING) + if self.env.context == 'cli': + if self.env.verbose > 0: + stderr.setLevel(logging.INFO) + else: + stderr.setLevel(logging.WARNING) + else: + stderr.setLevel(logging.INFO) stderr.setFormatter(util.LogFormatter(FORMAT_STDERR)) log.addHandler(stderr) @@ -549,7 +553,7 @@ class API(DictProxy): try: __import__(fullname) except errors.SkipPluginModule, e: - self.log.info( + self.log.debug( 'skipping plugin module %s: %s', fullname, e.reason ) except StandardError, e: -- cgit