diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-02-11 17:24:20 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-02-14 10:23:52 -0500 |
commit | 29706fb13ba99b4309c2004668e952d997f25d5f (patch) | |
tree | eb4326c59615b3839cac9fec53723f32d8d0f660 /ipalib/plugable.py | |
parent | 1315ba19d2c4bdda3dc50b46994f0c4ead5d7da0 (diff) | |
download | freeipa-29706fb13ba99b4309c2004668e952d997f25d5f.tar.gz freeipa-29706fb13ba99b4309c2004668e952d997f25d5f.tar.xz freeipa-29706fb13ba99b4309c2004668e952d997f25d5f.zip |
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
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r-- | ipalib/plugable.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py index a7e61ddbd..723414ced 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: |