From 397ec295ca53ff8c55f711bd850ee65466cd7c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Sat, 31 Jan 2026 20:56:03 -0800 Subject: [PATCH] Document logging behavior and dontlog feature --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 12ae4d1..47ca1b3 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,22 @@ To get a shell in the container run And then run `curl -H 'Host: i.perl.org' localhost` there. +## Logging + +Access logs are sent to stdout and error logs to stderr, making them +available to the container runtime's log collection. + +The Apache configuration supports a `dontlog` environment variable. When +set on a request, that request is excluded from the access log. This is +useful for health check endpoints that would otherwise fill the logs. + +To use it, add a `SetEnvIf` directive in your site configuration: + + SetEnvIf Request_URI "^/ok.txt$" dontlog + +This allows `/ok.txt` to serve as a health check endpoint without +generating access log entries. + ## Production image The "production image" is at harbor.ntppool.org/library/static-web:latest