Server Logging#
The server writes text logs to standard error by default. Select JSON output with --log-format json:
$ vl-convert serve \
> --log-format json --log-level info \
> --port 3000
--log-filter accepts a tracing-subscriber directive and takes priority over --log-level. Use it when one component needs more detail:
$ vl-convert serve \
> --log-format json \
> --log-filter 'vl_convert=debug,tower_http=info' \
> --port 3000
Debug logs include more detail and can contain resource names or error details.
Request Fields#
Each JSON response event contains standard request context:
Field |
Meaning |
|---|---|
|
Request method |
|
Request path and query |
|
HTTP protocol version |
|
Caller user agent |
|
Request correlation identifier |
|
Response status |
|
Request latency in milliseconds |
|
Incoming W3C trace context, when supplied |
When render-time budgets are enabled, response events also contain:
Field |
Meaning |
|---|---|
|
|
|
Settled charge, or the refunded hold when the outcome is |
|
Measured processing time |
|
Added Google Fonts charge |
|
Shared capacity after the request |
|
Client capacity after the request |
|
Address used for per-IP accounting |
Font work adds google_font.css_cache_misses, google_font.file_cache_misses, google_font.downloaded_bytes, and google_font.resolved_variants.
Correlate a Request#
The server returns an X-Request-Id header with each response. With --log-format json, the same value appears in server logs as http.request_id. Use it to find the logs for a request.
The server generates an ID when the request does not include one. To supply your own request ID:
$ curl -i http://127.0.0.1:3000/themes \
> -H 'X-Request-Id: render-01'
Vega Diagnostics#
Successful render, compilation, HTML, and scenegraph responses also carry X-VLC-Logs, a JSON array of up to 50 Vega diagnostic messages. Inspect it when a chart renders but Vega reported warnings. URL and font-inspection responses do not include this header.