summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2007-12-11 09:56:37 -0500
committerRob Crittenden <rcritten@redhat.com>2007-12-11 09:56:37 -0500
commit2675f35fdf3121dd23658e4ea89e1600291d2b70 (patch)
treebb21da63ae769db033a27c7763b552bbace703a9
parent40ff6f21dbde577bd65721285d659152f27e90a6 (diff)
downloadfreeipa-2675f35fdf3121dd23658e4ea89e1600291d2b70.tar.gz
freeipa-2675f35fdf3121dd23658e4ea89e1600291d2b70.tar.xz
freeipa-2675f35fdf3121dd23658e4ea89e1600291d2b70.zip
Tie the logging module to 'PythonOption IPADebug' in /etc/httpd/conf.d/ipa.conf
-rw-r--r--ipa-server/xmlrpc-server/funcs.py6
-rw-r--r--ipa-server/xmlrpc-server/ipaxmlrpc.py14
2 files changed, 10 insertions, 10 deletions
diff --git a/ipa-server/xmlrpc-server/funcs.py b/ipa-server/xmlrpc-server/funcs.py
index 26fee6aba..4943da24d 100644
--- a/ipa-server/xmlrpc-server/funcs.py
+++ b/ipa-server/xmlrpc-server/funcs.py
@@ -53,11 +53,6 @@ DefaultUserContainer = "cn=users,cn=accounts"
DefaultGroupContainer = "cn=groups,cn=accounts"
DefaultServiceContainer = "cn=services,cn=accounts"
-# FIXME: need to check the ipadebug option in ipa.conf
-#logging.basicConfig(level=logging.DEBUG,
-# format='%(asctime)s %(levelname)s %(message)s',
-# stream=sys.stderr)
-
#
# Apache runs in multi-process mode so each process will have its own
# connection. This could theoretically drive the total number of connections
@@ -807,6 +802,7 @@ class IPAServer:
"""Returns a list: counter followed by the results.
If the results are truncated, counter will be set to -1."""
+ logging.debug("IPA: find users %s" % criteria)
config = self.get_ipa_config(opts)
if timelimit < 0:
timelimit = float(config.get('ipasearchtimelimit'))
diff --git a/ipa-server/xmlrpc-server/ipaxmlrpc.py b/ipa-server/xmlrpc-server/ipaxmlrpc.py
index d15ed5ddd..7752b2586 100644
--- a/ipa-server/xmlrpc-server/ipaxmlrpc.py
+++ b/ipa-server/xmlrpc-server/ipaxmlrpc.py
@@ -32,6 +32,7 @@ import traceback
import pprint
from xmlrpclib import Marshaller,loads,dumps,Fault
from mod_python import apache
+import logging
import ipaserver
import funcs
@@ -148,12 +149,15 @@ class ModXMLRPCRequestHandler(object):
opts['ipadebug'] = pythonopts.get("IPADebug")
if opts['ipadebug'].lower() == "on":
+ logging.basicConfig(level=logging.DEBUG,
+ format='[%(asctime)s] [%(levelname)s] %(message)s',
+ datefmt='%a %b %d %H:%M:%S %Y',
+ stream=sys.stderr)
+
for o in opts:
- sys.stderr.write("IPA: setting option %s: %s\n" % (o, opts[o]))
- sys.stderr.flush()
- for e in req.subprocess_env:
- sys.stderr.write("IPA: environment %s: %s\n" % (e, req.subprocess_env[e]))
- sys.stderr.flush()
+ logging.debug("IPA: setting option %s: %s" % (o, opts[o]))
+# for e in req.subprocess_env:
+# logging.debug("IPA: environment %s: %s" % (e, req.subprocess_env[e]))
# Tack onto the end of the passed-in arguments any options we also
# need