summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-08-19 16:20:01 -0400
committerRob Crittenden <rcritten@redhat.com>2011-08-19 01:21:35 -0400
commit4797cddbd0ac922d03943d63ef9ff131e67c71e4 (patch)
treed4de6b6f8159cf6dcfa15d36292a454a3fbd5f9a /ipaserver
parent159c13a550f1943de47592615a43576c9dbc2dbe (diff)
downloadfreeipa-4797cddbd0ac922d03943d63ef9ff131e67c71e4.zip
freeipa-4797cddbd0ac922d03943d63ef9ff131e67c71e4.tar.gz
freeipa-4797cddbd0ac922d03943d63ef9ff131e67c71e4.tar.xz
Log each command in a batch separately.
This also fixes command logging in general, it wasn't working in most cases as a regression in ticket 1322. https://fedorahosted.org/freeipa/ticket/1598
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/rpcserver.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py
index cf0deed..39cdbcc 100644
--- a/ipaserver/rpcserver.py
+++ b/ipaserver/rpcserver.py
@@ -195,6 +195,9 @@ class WSGIExecutioner(Executioner):
error = None
_id = None
lang = os.environ['LANG']
+ name = None
+ args = ()
+ options = {}
if not 'KRB5CCNAME' in environ:
return self.marshal(result, CCacheError(), _id)
try:
@@ -227,12 +230,14 @@ class WSGIExecutioner(Executioner):
error = InternalError()
finally:
os.environ['LANG'] = lang
- if error is None:
+ if name:
params = self.Command[name].args_options_2_params(*args, **options)
if error:
self.info('%s: %s(%s): %s', context.principal, name, ', '.join(self.Command[name]._repr_iter(**params)), e.__class__.__name__)
else:
self.info('%s: %s(%s): SUCCESS', context.principal, name, ', '.join(self.Command[name]._repr_iter(**params)))
+ else:
+ self.info('%s: %s', context.principal, e.__class__.__name__)
return self.marshal(result, error, _id)
def simple_unmarshal(self, environ):