[X2Go-Commits] [x2gobroker] 03/06: Correctly initialize the loggers when using x2gobroker via WSGI in Apache2.
git-admin at x2go.org
git-admin at x2go.org
Sat Apr 20 16:51:28 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2gobroker.
commit 8bc58d7ed8201b2fad5cfc0da83b2dd052cf1ed3
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon Mar 18 11:01:37 2019 +0100
Correctly initialize the loggers when using x2gobroker via WSGI in Apache2.
---
bin/x2gobroker | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/bin/x2gobroker b/bin/x2gobroker
index d5e8bdb..092f937 100755
--- a/bin/x2gobroker
+++ b/bin/x2gobroker
@@ -299,16 +299,18 @@ if __name__ == "__main__":
urls = ()
settings = {}
-# raise log level to DEBUG if requested...
-if x2gobroker.defaults.X2GOBROKER_DEBUG and not x2gobroker.defaults.X2GOBROKER_TESTSUITE:
- logger_broker.setLevel(logging.DEBUG)
- logger_access.setLevel(logging.DEBUG)
- logger_error.setLevel(logging.DEBUG)
+
# run the Python Tornado standalone daemon or handle interactive command line execution (via SSH)
if __name__ == "__main__":
+ # raise log level to DEBUG if requested...
+ if x2gobroker.defaults.X2GOBROKER_DEBUG and not x2gobroker.defaults.X2GOBROKER_TESTSUITE:
+ logger_broker.setLevel(logging.DEBUG)
+ logger_access.setLevel(logging.DEBUG)
+ logger_error.setLevel(logging.DEBUG)
+
logfile_prelude(mode=cmdline_args.mode.upper())
if cmdline_args.mode.upper() == 'HTTP' or PROG_NAME == 'x2gobroker-daemon':
@@ -371,6 +373,16 @@ else:
### launch as WSGI application ###
+ logger_broker = x2gobroker.loggers.logger_broker
+ logger_access = x2gobroker.loggers.logger_broker
+ logger_error = x2gobroker.loggers.logger_error
+
+ # raise log level to DEBUG if requested...
+ if x2gobroker.defaults.X2GOBROKER_DEBUG and not x2gobroker.defaults.X2GOBROKER_TESTSUITE:
+ logger_broker.setLevel(logging.DEBUG)
+ logger_access.setLevel(logging.DEBUG)
+ logger_error.setLevel(logging.DEBUG)
+
prep_http_mode()
import tornado.wsgi
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
More information about the x2go-commits
mailing list