-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettingslocal.py
More file actions
47 lines (44 loc) · 1.32 KB
/
settingslocal.py
File metadata and controls
47 lines (44 loc) · 1.32 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
import os
DEBUG = True
SPLUNK_HOST = 'splunk.example.com'
SPLUNK_PORT = '8089'
SPLUNK_USERNAME = 'changeme'
SPLUNK_PASSWORD = 'changeme'
SPLUNK_INDEX = 'main'
SPLUNK_HOSTNAME = "link-consus.mailbeaker.dev"
SPLUNK_VERIFY = False
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'json': {
'()': 'pythonjsonlogger.jsonlogger.JsonFormatter',
'format': '%(asctime)s %(created)f %(exc_info)s %(filename)s %(funcName)s %(levelname)s %(levelno)s %(lineno)d %(module)s %(message)s %(pathname)s %(process)s %(processName)s %(relativeCreated)d %(thread)s %(threadName)s'
}
},
'handlers': {
'splunk': {
'level': 'INFO',
'class': 'splunk_handler.SplunkHandler',
'formatter': 'json',
'host': SPLUNK_HOST,
'port': SPLUNK_PORT,
'username': SPLUNK_USERNAME,
'password': SPLUNK_PASSWORD,
'index': SPLUNK_INDEX,
'hostname': SPLUNK_HOSTNAME,
'sourcetype': 'json',
'verify': SPLUNK_VERIFY
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
}
},
'loggers': {
'': {
'handlers': ['console', 'splunk'],
'level': 'INFO'
}
}
}