-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
31 lines (29 loc) · 865 Bytes
/
main.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
import sys
from logging import INFO, getLogger
from logging.config import dictConfig
from sqs_polling import command_main
if __name__ == "__main__":
dictConfig(
{
"version": 1,
"formatters": {
"json": {
"()": "pythonjsonlogger.jsonlogger.JsonFormatter",
"json_ensure_ascii": False,
},
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"stream": sys.stdout,
"formatter": "json",
},
},
"loggers": {
"sqs_polling.polling": {"handlers": ["console"], "level": "INFO"}
},
}
)
logger = getLogger("sqs_polling.polling")
logger.setLevel(INFO)
command_main()