This repository was archived by the owner on Mar 13, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from datetime import datetime
2- from logging . config import dictConfig
2+ import logging
33
44from flask import Flask , abort , request
55
6- from const import GithubHeaders
7-
8- dictConfig (
9- {
10- "version" : 1 ,
11- "formatters" : {
12- "default" : {
13- "format" : "[%(asctime)s]: %(levelname)s | %(message)s" ,
14- }
15- },
16- "handlers" : {
17- "wsgi" : {
18- "class" : "logging.StreamHandler" ,
19- "stream" : "ext://flask.logging.wsgi_errors_stream" ,
20- "formatter" : "default" ,
21- }
22- },
23- "root" : {"level" : "INFO" , "handlers" : ["wsgi" ]},
24- }
25- )
6+ from const import GithubHeaders , LOGGING_CONFIG
7+
8+ logging .config .dictConfig (LOGGING_CONFIG )
269
2710app = Flask (__name__ )
2811
Original file line number Diff line number Diff line change @@ -7,3 +7,21 @@ class GithubHeaders(str, Enum):
77 EVENT = "X-Github-Event"
88 HOOK_ID = "X-Github-Hook-Id"
99 DELIVERY = "X-Github-Delivery"
10+
11+
12+ LOGGING_CONFIG = {
13+ "version" : 1 ,
14+ "formatters" : {
15+ "default" : {
16+ "format" : "[%(asctime)s]: %(levelname)s | %(message)s" ,
17+ }
18+ },
19+ "handlers" : {
20+ "wsgi" : {
21+ "class" : "logging.StreamHandler" ,
22+ "stream" : "ext://flask.logging.wsgi_errors_stream" ,
23+ "formatter" : "default" ,
24+ }
25+ },
26+ "root" : {"level" : "INFO" , "handlers" : ["wsgi" ]},
27+ }
You can’t perform that action at this time.
0 commit comments