-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconstants.py
More file actions
40 lines (31 loc) · 1.08 KB
/
constants.py
File metadata and controls
40 lines (31 loc) · 1.08 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
import logging
API_URL = 'https://api.stackify.com'
IDENTIFY_URL = '/Metrics/IdentifyApp'
LOG_SAVE_URL = '/Log/Save'
# using `%2F` instead of `/` as per package documentation
DEFAULT_SOCKET_FILE = '%2Fusr%2Flocal%2Fstackify%2Fstackify.sock'
DEFAULT_HTTP_ENDPOINT = 'https://localhost:10601'
SOCKET_URL = 'http+unix://' + DEFAULT_SOCKET_FILE
AGENT_LOG_URL = '/log'
API_REQUEST_INTERVAL_IN_SEC = 30
MAX_BATCH = 100
QUEUE_SIZE = 1000
READ_TIMEOUT = 5000
LOGGING_LEVELS = {
logging.CRITICAL: 'CRITICAL',
logging.ERROR: 'ERROR',
logging.WARNING: 'WARNING',
logging.INFO: 'INFO',
logging.DEBUG: 'DEBUG',
logging.NOTSET: 'NOTSET'
}
DEFAULT_LEVEL = logging.INFO
# this is used to separate builtin keys from user-specified keys
RECORD_VARS = set(logging.LogRecord('', '', '', '', '', '', '', '').__dict__.keys())
# the "message" attribute is saved on the record object by a Formatter
RECORD_VARS.add('message')
RECORD_VARS.add('trans_id')
RECORD_VARS.add('log_id')
TRANSPORT_TYPE_DEFAULT = 'default'
TRANSPORT_TYPE_AGENT_SOCKET = 'agent_socket'
TRANSPORT_TYPE_AGENT_HTTP = 'agent_http'