X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=apache%2Fplc.wsgi;h=3e0d51c6e7be5fa14b93a51470a10b4946642651;hb=1e4558f1e8eaec5f69f3832a8599d0dfa1531f00;hp=c37d3695b5d59b93066420aa98384809b76ee24d;hpb=ad9b3c8054edb60ae4f764bb7bfa12653c06dc99;p=plcapi.git diff --git a/apache/plc.wsgi b/apache/plc.wsgi index c37d369..3e0d51c 100644 --- a/apache/plc.wsgi +++ b/apache/plc.wsgi @@ -9,7 +9,7 @@ import sys sys.path.append('/usr/share/plc_api') sys.stdout = sys.stderr import traceback -from PLC.Debug import log +from PLC.Logger import logger from PLC.API import PLCAPI def application(environ, start_response): @@ -40,11 +40,11 @@ def application(environ, start_response): # Shut down database connection, otherwise up to MaxClients DB # connections will remain open. api.db.close() - except Exception, err: + except Exception as err: status = '500 Internal Server Error' content_type = 'text/html' output = 'Internal Server Error' - print >> log, err, traceback.format_exc() + logger.exception("INTERNAL ERROR !!") # Write response response_headers = [('Content-type', '%s' % content_type),