Skip to content

docs: access log format (v3) - #16

Merged
joseluisq merged 9 commits into
static-web-server:masterfrom
frenzzy:docs/access-log-format
Nov 1, 2026
Merged

joseluisq merged 9 commits into
static-web-server:masterfrom
frenzzy:docs/access-log-format

Conversation

@frenzzy

@frenzzy frenzzy commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Documents --access-log-format / SERVER_ACCESS_LOG_FORMAT / access-log-format: tokens, output, escaping, plus the env, TOML and CLI pages. Code PRs: static-web-server/static-web-server#785 (continues #637) and static-web-server/static-web-server#795 (%{bytes} and %{duration} cover the sent body).

frenzzy and others added 3 commits October 31, 2026 18:48
- `%{host}` is the host sent by the client, before URL rewrites: the
  request URI authority, else the `Host` header.
- Health probes are `/livez` and `/readyz`.
- Escaped values longer than 4 KiB are cut and end with `...`.
@frenzzy

frenzzy commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a13ffc4.

  • Fixed the MD060 table alignment (yarn format:check is green).
  • The Access Log Format section now documents the behaviour of Log when the response body finishes static-web-server#795, which links this PR as its docs:
    • The line is written when hyper drops the response body, so it carries the whole transfer.
    • %{bytes} is the number of body bytes sent, including on-the-fly compression and excluding headers. It is - when no body bytes were sent, always for HEAD, 204 and 304, like CLF %b.
    • %{duration} covers the whole transfer, until the body is finished.
    • Aborted downloads are logged with the bytes sent so far.
    • %{timestamp} is the local time when the line is written, in the CLF format, honoring TZ.
  • Also clarified: %{uri} is path and query before rewrites, an empty value is written as -, \xHH escapes use uppercase hex.

This should be merged together with, or after, #795.

@joseluisq joseluisq added enhancement New feature or request v3 labels Nov 1, 2026
…evel

static-web-server/static-web-server#794 logs the authority-form `CONNECT`
target in `%{uri}` instead of `/`, and skips the access line when its level
is filtered, which the default `-g error` does.
@joseluisq
joseluisq merged commit e27ec52 into static-web-server:master Nov 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants