-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.py
More file actions
92 lines (84 loc) · 2.12 KB
/
settings.py
File metadata and controls
92 lines (84 loc) · 2.12 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import time
DEBUG = True # Whether or not to show DEBUG level messages
USE_COLORS = True # Whether or not colors should be used when outputting text
EMAILS_FILENAME = 'data/emails.csv'
DOMAINS_FILENAME = 'data/domains.csv'
ADDONS_INFO_FILENAME = 'link_for_crawler.txt'
LOGGING = { # dictConfig for output stream and file logging
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'console': {
'format': '[%(asctime)s] %(levelname)s::%(module)s - %(message)s',
},
'file': {
'format': '[%(asctime)s] %(levelname)s::(P:%(process)d T:%(thread)d)::%(module)s - %(message)s',
},
},
'handlers': {
'console': {
'class': 'ColorStreamHandler.ColorStreamHandler',
'formatter':'console',
'level': 'DEBUG',
'use_colors': USE_COLORS,
},
'file': {
'class': 'logging.handlers.TimedRotatingFileHandler',
'formatter':'file',
'level': 'INFO',
'when': 'midnight',
'filename': 'logs/pycrawler.log',
'interval': 1,
'backupCount': 0,
'encoding': None,
'delay': False,
'utc': False,
},
},
'loggers': {
'crawler_logger': {
'handlers': ['console', 'file'],
'level': 'DEBUG' if DEBUG else 'INFO',
'propagate': True,
},
}
}
LOGGING2 = { # dictConfig for output stream and file logging
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'console': {
'format': '[%(asctime)s] %(levelname)s::%(module)s - %(message)s',
},
'file': {
'format': '[%(asctime)s] %(levelname)s::(P:%(process)d T:%(thread)d)::%(module)s - %(message)s',
},
},
'handlers': {
'console': {
'class': 'ColorStreamHandler.ColorStreamHandler',
'formatter':'console',
'level': 'DEBUG',
'use_colors': USE_COLORS,
},
'file': {
'class': 'logging.handlers.TimedRotatingFileHandler',
'formatter':'file',
'level': 'INFO',
'when': 'midnight',
'filename': 'logs/pycrawler.log',
'interval': 1,
'backupCount': 0,
'encoding': None,
'delay': False,
'utc': False,
},
},
'loggers': {
'voodoo_logger': {
'handlers': ['console', 'file'],
'level': 'DEBUG' if DEBUG else 'INFO',
'propagate': True,
},
}
}