Skip to main content

The server's logs

The backend writes its logs on its standard error: docker compose logs backend, kubectl logs, or your log collector reads them.

deployments/deploy.py deployments/production.env compose logs -f --tail 100 backend

They have:

  • One line per API request: method, path, status, duration, the user who signed in and the project when the request names one, with a request id. The query string isn't logged: tokens can be there. Health checks and nginx's checks of who can read a file only show at the DEBUG level, unless they fail.
  • The jobs worker (qaboard-admin jobs worker, Admin → Storage): each job when it starts, its log, its end with its status and duration, and the traceback when it crashes.
  • Migrations when the backend starts: each one that runs.
  • uWSGI's own events: workers starting and stopping, requests killed for being too slow (harakiri).
2026-11-24 10:00:01,234 INFO backend.requests [3f2a9c1e5b7d4a60c81e2f90d4b7a613] GET /api/v1/commit/abc123 200 41.3ms user=alice project=group/project
2026-11-24 10:00:03,512 INFO backend.jobs.worker worker backend-1:42: job 17: done in 3.2s

Logs never have passwords, tokens, cookies or request bodies. Users are named by their username.

The proxy (nginx) keeps an access log in its container, /tmp/access.log, like nginx's combined format but without query strings, also in the Referer: tokens can be there. To log them anyway, e.g. while debugging, change services/nginx/access-log.conf.

Settings​

Set them like the backend's other settings: in the env file of your environment with docker compose, in config with the Helm chart.

VariableDefaultDescription
QABOARD_LOG_LEVELINFODEBUG, INFO, WARNING or ERROR: the least important QA-Board messages shown. Other libraries only log warnings
QABOARD_LOG_FORMATtextjson: one JSON object per line, for log collectors (Loki, Elasticsearch, Cloud Logging...)
UWSGI_REQUEST_LOGSunset1 (or true, yes) to also get uWSGI's request lines, as older versions had. They include the query string

In JSON, each line has time, level, logger, message, and the fields of the message, e.g. for requests:

{"time": "2026-11-24T10:00:01.234Z", "level": "INFO", "logger": "backend.requests", "message": "GET /api/v1/commit/abc123 200 41.3ms user=alice project=group/project", "request_id": "3f2a9c1e5b7d4a60c81e2f90d4b7a613", "method": "GET", "path": "/api/v1/commit/abc123", "status": 200, "duration_ms": 41.3, "endpoint": "commit", "user": "alice", "project": "group/project"}

Follow a request​

Each response has an X-Request-ID header, and everything the backend logs while answering it has that id. QA-Board's nginx gives each request an id, writes it in its access log and sends it to the backend: both logs share ids. When a proxy in front of nginx (e.g. an ingress) already sends an X-Request-ID, nginx and the backend keep it if it looks like an id: up to 64 letters, digits, ., _, : or - (nginx's own $request_id is 32 hexadecimal digits). The ids then match in all three. Other values are replaced by a new id. In the text format, control characters in messages, e.g. a newline in a requested path, are escaped: each record stays on one line.

A user who sees an error can give you the request id from their browser's network panel; grep it in the logs:

deployments/deploy.py deployments/production.env compose logs backend | grep 3f2a9c1e5b7d4a60c81e2f90d4b7a613
deployments/deploy.py deployments/production.env compose exec proxy grep 3f2a9c1e5b7d4a60c81e2f90d4b7a613 /tmp/access.log

nginx's access log, in the proxy container's /tmp/access.log, has nginx's usual combined fields, then the request's duration in seconds and its id:

10.0.0.7 - - [24/Nov/2026:10:00:01 +0000] "GET /api/v1/commit/abc123 HTTP/1.1" 200 5120 "https://qaboard.example.com/" "Mozilla/5.0 ..." 0.042 request_id=3f2a9c1e5b7d4a60c81e2f90d4b7a613

Unlike the backend's, nginx's access log has the query string: tokens sent in ?token= URLs can be there.

Errors​

Errors are logged with their traceback. With Sentry, they're also reported there, once: not again from the request's log line.

The qa CLI's logs​

qa logs what it does when users ask for it: qa -v, qa -vv for the requests it makes to the server (debug what qa does).