Skip to content

Commit 21dfc19

Browse files
committed
Added some logging to wsgi.py, to show the virtualenv settings being used.
- Legacy-Id: 12230
1 parent 47681c5 commit 21dfc19

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ietf/wsgi.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,19 @@
4040

4141
import os
4242
import sys
43+
import syslog
4344

4445
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
4546

47+
syslog.openlog("datatracker", syslog.LOG_PID, syslog.LOG_USER)
48+
4649
# Virtualenv support
4750
virtualenv_activation = os.path.join(path, "env", "bin", "activate_this.py")
4851
if os.path.exists(virtualenv_activation):
52+
syslog.syslog("Starting datatracker wsgi with virtualenv %s" % os.path.dirname(os.path.dirname(virtualenv_activation)))
4953
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
54+
else:
55+
syslog.syslog("Starting datatracker wsgi without virtualenv")
5056

5157
if not path in sys.path:
5258
sys.path.insert(0, path)

0 commit comments

Comments
 (0)