forked from TheCaduceus/Microsoft-E5-Auto-Renewal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
39 lines (36 loc) · 1.13 KB
/
config.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
from os import environ as env
"""
Changing value to "" (empty) or 0 will force the program to acquire that variable's value from system environment.
"""
REFRESH_TOKEN = "" or env.get("E5_REFRESH_TOKEN")
CLIENT_ID = "" or env.get("E5_CLIENT_ID")
CLIENT_SECRET = "" or env.get("E5_CLIENT_SECRET")
WEB_APP_PASSWORD = "" or env.get("E5_WEB_APP_PASSWORD")
WEB_APP_HOST = "0.0.0.0" or env.get("E5_WEB_APP_HOST")
WEB_APP_PORT = 8080 or int(env.get("PORT"))
TIME_DELAY = 3 or int(env.get("E5_TIME_DELAY"))
# WEB SERVER LOGGING CONFIGURATION
LOGGER_CONFIG_JSON = {
'version': 1,
'formatters': {
'default': {
'format': '[%(asctime)s][%(name)s][%(levelname)s] -> %(message)s',
'datefmt': '%d/%m/%Y %H:%M:%S'
},
},
'handlers': {
'file_handler': {
'class': 'logging.FileHandler',
'filename': 'event-log.txt',
'formatter': 'default'
},
'stream_handler': {
'class': 'logging.StreamHandler',
'formatter': 'default'
}
},
'root': {
'level': 'INFO',
'handlers': ['file_handler', 'stream_handler']
}
}