-
Notifications
You must be signed in to change notification settings - Fork 0
/
cwb-cads.wsgi
44 lines (39 loc) · 994 Bytes
/
cwb-cads.wsgi
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
43
44
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from logging.config import dictConfig
dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, dir_path)
from cads import create_app
from cfg import ProdConfig
dictConfig({
'version': 1,
'formatters': {
'default': {
'format': '[%(asctime)s] %(levelname)s in %(module)s: %(message)s',
}
},
'handlers': {
'wsgi': {
'class': 'logging.handlers.RotatingFileHandler',
"formatter": "default",
"filename": os.path.join(dir_path, "instance", "mmda.log"),
"maxBytes": 10000000,
"backupCount": 10,
"delay": "True"
}
},
'root': {
'level': 'INFO',
'handlers': ['wsgi']
},
'loggers':{
'cads': {
'level': 'DEBUG',
'handlers': ['wsgi'],
'propagate': False
}
}
})
application = create_app(ProdConfig)