Skip to content

Commit

Permalink
feat: update log
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai committed Apr 14, 2024
1 parent ff4f738 commit 4f622d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/routers/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
CLIENT_SECRET = get_env_variable("GITHUB_APP_CLIENT_SECRET")


logger = logging.getLogger(__name__)
logger = logging.getLogger()
logger.setLevel("INFO")

router = APIRouter(
prefix="/api/github",
tags=["health_checkers"],
Expand Down Expand Up @@ -97,5 +99,7 @@ def github_app_callback(code: str, installation_id: str, setup_action: str):
@router.post("/app/webhook")
async def github_app_webhook(request: Request, background_tasks: BackgroundTasks, x_github_event: str = Header(...)):
payload = await request.body()
print("x_github_event=", x_github_event)
print("payload=", payload)
logger.info("github_app_webhook: x_github_event=%s, %s", x_github_event, payload)
return {"hello": "world"}

0 comments on commit 4f622d0

Please sign in to comment.