forked from Flobul/conso_veolia
-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.py.sample
64 lines (62 loc) · 2.1 KB
/
config.py.sample
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import os
import sys
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
DOWNLOAD_DIR_TMP = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'tmp')
try:
os.mkdir(DOWNLOAD_DIR_TMP)
except:
pass
GECKODRIVER_PATH = os.path.join(BASE_DIR, 'geckodriver')
VEOLIA_LOGIN = '[email protected]'
VEOLIA_PASSWORD = 'XXXX'
# Creer un equipemen virtuel dans jeedom (plugin virtuel), avec 2 commandes de types info. Renseigner l'Id de ces deux commandes ici
JEEDOM_CMD_INDEX = 5583
JEEDOM_CMD_CONSO_24H = 5584
LOGGING_CONFIG = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'standard': {
# 'format': '%(asctime)-15s - %(process)d [%(levelname)s] %(name)s: %(message)s'
'format': '%(asctime)-15s - %(process)d %(filename)s@%(funcName)s:%(lineno)d [%(levelname)s] %(name)s: %(message)s'
},
},
'handlers': {
'default': {
'level': 'DEBUG',
'formatter': 'standard',
'class': 'logging.StreamHandler',
},
'file': {
'level': 'DEBUG',
'formatter': 'standard',
'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join('logs', '%s.log' % os.path.basename(sys.argv[0])),
'maxBytes': 1*1024*1024,
'backupCount': 1,
},
'syslog': {
'level': 'INFO',
'class': 'logging.handlers.SysLogHandler',
'address': ('127.0.0.1', 514),
'socktype': 2, # 1=tcp 2=ud^p
'formatter': 'standard',
},
'smtp': {
'level': 'ERROR',
'formatter': 'standard',
'class': 'logging.handlers.SMTPHandler',
'mailhost': '127.0.0.1',
'fromaddr': '[email protected]',
'toaddrs': '@gmail.com',
'subject': '%s Error'%os.path.basename(sys.argv[0]),
},
},
'loggers': {
'': {
'handlers': ['default', 'file'],#, 'syslog', 'smtp'],
'level': 'DEBUG',
'propagate': True
},
}
}