Add JSON logger

master
Lauri Võsandi 5 months ago
parent aa6598ee68
commit 85c9adfe74
  1. 1
      Dockerfile
  2. 2
      camdetect.py

@ -18,6 +18,7 @@ RUN apt-get update \
motor \
prometheus_client \
sanic==21.6.2 \
sanic-json-logging \
git+https://github.com/Assarius/sanic-prometheus@Sanic_22 \
&& apt-get remove -y \
build-essential \

@ -18,6 +18,7 @@ from math import inf
from motor.motor_asyncio import AsyncIOMotorClient
from prometheus_client import Counter, Gauge, Histogram
from sanic import Sanic, response
from sanic_json_logging import setup_json_logging
from sanic.log import logger
from sanic_prometheus import monitor
from sanic.response import stream
@ -409,6 +410,7 @@ async def downloader(queue: asyncio.Queue):
await asyncio.sleep(1)
app = Sanic("camdetect")
setup_json_logging(app)
@app.route("/bypass")

Loading…
Cancel
Save