From 7499a553eebca8234ca0e00b3ce8bdea07949635 Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Thu, 14 Apr 2016 12:12:35 +1000 Subject: [PATCH] Add hidden --verbose-debugging flag to mod_wsgi-express. --- src/server/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server/__init__.py b/src/server/__init__.py index 93031902..39aef08d 100644 --- a/src/server/__init__.py +++ b/src/server/__init__.py @@ -282,6 +282,8 @@ def find_mimetypes(): WSGIPythonHome '%(python_home)s' +WSGIVerboseDebugging '%(verbose_debugging_flag)s' + WSGIRestrictEmbedded On WSGISocketPrefix %(server_root)s/wsgi @@ -2243,6 +2245,9 @@ def check_percentage(option, opt_str, value, parser): help='Flag indicating whether the web server startup log should ' 'be enabled. Defaults to being disabled.'), + optparse.make_option('--verbose-debugging', action='store_true', + dest='verbose_debugging', help=optparse.SUPPRESS_HELP), + optparse.make_option('--log-to-terminal', action='store_true', default=False, help='Flag indicating whether logs should ' 'be directed back to the terminal. Defaults to being disabled. ' @@ -2879,6 +2884,11 @@ def _cmd_setup_server(command, args, options): options['httpd_arguments_list'].append('-E') options['httpd_arguments_list'].append(options['startup_log_file']) + if options['verbose_debugging']: + options['verbose_debugging_flag'] = 'On' + else: + options['verbose_debugging_flag'] = 'Off' + if options['server_name']: host = options['server_name'] else: