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: