Configurable access and error logging#19
Open
kilgor-trout-c22 wants to merge 10 commits into
Open
Conversation
Introduce access log (site) and server log (Caddy default logger) with stdout/file output, JSON/console format, level and roll controls via HUMHUB_DOCKER__* env vars. Split frankenphp stdout/stderr streams, enable PHP log_errors, add optional app.log stdout mirror, and document the concept in docs/logging.md.
Merge all php_ini directives into one heredoc to avoid the trailing-newline concatenation that produced an invalid directive. Default access log to off (too verbose) and drop the redundant PHP defaults comment.
Prefix each scheduler/worker output line with the supervisor process name (distinguishes worker_00/_01) and drop the now-redundant Cron:/Worker: text. Add stopasgroup/killasgroup so their child processes shut down cleanly, and unify supervisord log paths to /dev/stdout and /dev/stderr.
Run the app.log mirror through a wrapper script so each line is prefixed with the supervisor process name (like scheduler/worker), and signal its group on stop. Document the process prefixes as the primary way to tell sources apart.
Leave trusted-proxy/client-IP handling to the reverse-proxy operator instead of configuring it in the image. Document the opt-in via the base image's CADDY_GLOBAL_OPTIONS variable, with a GDPR note.
Also document the server-log file rotation defaults (Caddy 100 MiB / 10 files / 90 days).
luke-
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds configurable logging to the image and documents it in
docs/logging.md.Access & error logs
json/consoleformat,stdoutor a rolled file under/data, Mercureauthorizationquery param redacted.stdout/stderr/file, or disabled.log_errors(withdisplay_errors Off).Process output
[humhub-scheduler],[humhub-worker_00],[humhub-app-log]).stopasgroup/killasgroupfor the programs that fork children.app.logis pre-created and mirrored to stdout by default (opt-out).Env vars
HUMHUB_DOCKER__ACCESS_LOG[_FORMAT|_OUTPUT|_FILE|_ROLL_SIZE|_ROLL_KEEP],HUMHUB_DOCKER__SERVER_LOG[_LEVEL|_FORMAT|_OUTPUT|_FILE],HUMHUB_DOCKER__APP_LOG_STDOUT. Full reference indocs/logging.md.Notes
CADDY_GLOBAL_OPTIONS.