Skip to content

Commit 7e82771

Browse files
committed
up the logging
1 parent fbaa9cf commit 7e82771

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

clabot/github.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import asyncio
2+
import logging
23

34
from django.conf import settings
45
from django.http import HttpRequest, JsonResponse
@@ -19,14 +20,20 @@ class AsyncWebhookView(BaseAsyncWebhookView):
1920

2021
@override
2122
async def post(self, request: HttpRequest) -> JsonResponse:
23+
logging.info("Handling GH Post")
2224
event = self.get_event(request)
2325

2426
found_callbacks = self.router.fetch(event)
27+
logging.info(f"Callbacks found: {', '.join([str(f) for f in found_callbacks])}")
2528
if found_callbacks:
29+
logging.info("Creating EventLog")
2630
event_log = await EventLog.objects.acreate_from_event(event)
31+
logging.info("Dispatching callbacks")
2732
await self.router.adispatch(event, None)
33+
logging.info("Sending Response")
2834
return self.get_response(event_log)
2935
else:
36+
logging.info("Sending shortcut response")
3037
return JsonResponse(
3138
{
3239
"message": "ok",

gunicorn.conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
errorlog = "-"
1414
loglevel = "info"
1515
accesslog = "-"
16+
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %(M)'

0 commit comments

Comments
 (0)