summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-gui/ipa_webgui
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-05-28 13:59:19 -0400
committerRob Crittenden <rcritten@redhat.com>2008-06-03 22:41:09 -0400
commit9bcd31efc5abcfb529b30c8e067cd421e87d7ed4 (patch)
tree017d4a1fed8701e1c9f2e9c1582ff67feec49a09 /ipa-server/ipa-gui/ipa_webgui
parentc58b7a3d7c32147fd8e72de4254bb35191fedc4b (diff)
downloadfreeipa-9bcd31efc5abcfb529b30c8e067cd421e87d7ed4.tar.gz
freeipa-9bcd31efc5abcfb529b30c8e067cd421e87d7ed4.tar.xz
freeipa-9bcd31efc5abcfb529b30c8e067cd421e87d7ed4.zip
Fix issue of double logging in ipa_error.log.
We open the log in ipa_webgui and this was being inherited by TurboGears which uses the same log so everything was getting logged twice. Shut down the log in ipa_webgui at the last possible moment. This will not catch configuration errors. Add a Not Found template. Only print a traceback on 500 errors.
Diffstat (limited to 'ipa-server/ipa-gui/ipa_webgui')
-rw-r--r--ipa-server/ipa-gui/ipa_webgui7
1 files changed, 7 insertions, 0 deletions
diff --git a/ipa-server/ipa-gui/ipa_webgui b/ipa-server/ipa-gui/ipa_webgui
index 61eaf60c..5df57895 100644
--- a/ipa-server/ipa-gui/ipa_webgui
+++ b/ipa-server/ipa-gui/ipa_webgui
@@ -140,11 +140,13 @@ def main():
if devel:
logging.basicConfig(level=loglevel,
+ format='%(asctime)s %(name)s %(levelname)s %(message)s',
stream=sys.stderr)
else:
# This log file name needs to be kept in sync with the one in
# ipa_webgui.cfg
logging.basicConfig(level=loglevel,
+ format='%(asctime)s %(name)s %(levelname)s %(message)s',
filename='/var/log/ipa_error.log')
sys.path.append("/usr/share/ipa")
@@ -159,6 +161,11 @@ def main():
import cherrypy
cherrypy.lowercase_api = True
+ # Shut down the logging set up here so that CherryPy logging can take
+ # over. TurboGears configuration errors will not be caught.
+ if not devel:
+ logging.shutdown()
+
# Load the config - look for a local file first for development
# and then the system config file
if devel: