forked from osg-htc/path-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wsgi.py
executable file
·42 lines (37 loc) · 1.11 KB
/
wsgi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from logging.config import dictConfig
import os
import sys
HERE = os.path.dirname(__file__)
sys.path.append(HERE)
logdir = os.path.join(HERE, "logs")
if not os.path.exists(logdir):
logdir = "/var/log/condor"
dictConfig(
{
"version": 1,
"formatters": {
"default": {
"format": "[%(asctime)s] [%(levelname)s] %(module)s:%(lineno)s ~ %(message)s",
}
},
"handlers": {
"file": {
"class": "logging.handlers.RotatingFileHandler",
"level": "DEBUG",
"formatter": "default",
"filename": os.path.join(logdir, "registration.log"),
"maxBytes": 10485760,
"backupCount": 5,
},
"wsgi": {
"class": "logging.StreamHandler",
"level": "DEBUG",
"formatter": "default",
"stream": "ext://flask.logging.wsgi_errors_stream",
},
},
"root": {"level": "DEBUG", "handlers": ["file", "wsgi"]},
}
)
from portal import create_app
application = create_app()