summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-11-24 10:09:30 -0700
committerJason Gerard DeRose <jderose@redhat.com>2008-11-24 10:09:30 -0700
commit2db738e8996528502293b8cc6861efedcba22c9a (patch)
tree65a5f5e414c551e7e4103ba673c2b6f74980dfad /ipalib
parentc02770129db9b27a718dadbf438459c3404c8a5a (diff)
downloadfreeipa-2db738e8996528502293b8cc6861efedcba22c9a.tar.gz
freeipa-2db738e8996528502293b8cc6861efedcba22c9a.tar.xz
freeipa-2db738e8996528502293b8cc6861efedcba22c9a.zip
Some changes to make reading dubugging output easier
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/frontend.py5
-rw-r--r--ipalib/plugable.py5
-rw-r--r--ipalib/plugins/b_xmlrpc.py5
3 files changed, 12 insertions, 3 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 6e79e5399..6dcbea694 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -539,6 +539,7 @@ class Command(plugable.Plugin):
If not in a server context, the call will be forwarded over
XML-RPC and the executed an the nearest IPA server.
"""
+ self.debug(make_repr(self.name, *args, **kw))
if len(args) > 0:
arg_kw = self.args_to_kw(*args)
assert set(arg_kw).intersection(kw) == set()
@@ -548,7 +549,9 @@ class Command(plugable.Plugin):
kw.update(self.get_default(**kw))
self.validate(**kw)
(args, options) = self.params_2_args_options(kw)
- return self.run(*args, **options)
+ result = self.run(*args, **options)
+ self.debug('%s result: %r', self.name, result)
+ return result
def args_to_kw(self, *values):
"""
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index d65a83e2c..7dafd4401 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -253,6 +253,11 @@ class Plugin(ReadOnly):
__proxy__ = True
__api = None
+ def __init__(self):
+ log = logging.getLogger('ipa')
+ for name in ('debug', 'info', 'warning', 'error', 'critical'):
+ setattr(self, name, getattr(log, name))
+
def __get_name(self):
"""
Convenience property to return the class name.
diff --git a/ipalib/plugins/b_xmlrpc.py b/ipalib/plugins/b_xmlrpc.py
index 22361b1bb..b6e113a5c 100644
--- a/ipalib/plugins/b_xmlrpc.py
+++ b/ipalib/plugins/b_xmlrpc.py
@@ -51,14 +51,15 @@ class xmlrpc(Backend):
if uri.startswith('https://'):
return xmlrpclib.ServerProxy(uri,
transport=KerbTransport(),
- verbose=self.api.env.verbose,
+ #verbose=self.api.env.verbose,
)
- return xmlrpclib.ServerProxy(uri, verbose=self.api.env.verbose)
+ return xmlrpclib.ServerProxy(uri)
def forward_call(self, name, *args, **kw):
"""
Forward a call over XML-RPC to an IPA server.
"""
+ self.info('Forwarding %r call to %r' % (name, self.env.xmlrpc_uri))
client = self.get_client()
command = getattr(client, name)
params = xmlrpc_marshal(*args, **kw)