summaryrefslogtreecommitdiffstats
path: root/install/share/wsgi.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-08-10 10:00:35 -0400
committerRob Crittenden <rcritten@redhat.com>2010-08-19 10:49:12 -0400
commit897b296a694224f9d00a4bfcc80f818c858fbfb5 (patch)
tree787f1f743ff1df240983e15cee54c9aac0a78920 /install/share/wsgi.py
parent7a007d958b502df0aa94f03489db54680bdac655 (diff)
downloadfreeipa-897b296a694224f9d00a4bfcc80f818c858fbfb5.tar.gz
freeipa-897b296a694224f9d00a4bfcc80f818c858fbfb5.tar.xz
freeipa-897b296a694224f9d00a4bfcc80f818c858fbfb5.zip
Make the server log level more configurable, not defaulting to debug.
This disables debug output in the Apache log by default. If you want increased output create /etc/ipa/server.conf and set it to: [global] debug=True If this is too much output you can select verbose output instead: [global] debug=False verbose=True ticket 60
Diffstat (limited to 'install/share/wsgi.py')
-rw-r--r--install/share/wsgi.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/install/share/wsgi.py b/install/share/wsgi.py
index f6b99a2dc..52671b5ab 100644
--- a/install/share/wsgi.py
+++ b/install/share/wsgi.py
@@ -1,9 +1,19 @@
"""
WSGI appliction for IPA server.
"""
-
from ipalib import api
-api.bootstrap(context='server', debug=True, log=None)
+from ipalib.config import Env
+from ipalib.constants import DEFAULT_CONFIG
+
+# Determine what debug level is configured. We can only do this
+# by reading in the configuration file(s). The server always reads
+# default.conf and will also read in `context'.conf.
+env = Env()
+env._bootstrap(context='server', log=None)
+env._finalize_core(**dict(DEFAULT_CONFIG))
+
+# Initialize the API with the proper debug level
+api.bootstrap(context='server', debug=env.debug, log=None)
try:
api.finalize()
except StandardError, e: