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
This commit is contained in:
Rob Crittenden
2011-02-11 17:24:20 -05:00
parent 1315ba19d2
commit 29706fb13b
7 changed files with 24 additions and 16 deletions

View File

@@ -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: