1. The problem I’m having:
Hi!
I would like to change the initial log format, prior to loading the configuration file, so that also those logs can be properly ingested into log collection.
I noticed, that the log format depends on whether the terminal that is used to start caddy, is interactive or not.
Is there an option to change this format or at least select console or json format?
2. Error messages and/or full log output:
This is for example with the following log config and a non-interactive terminal:
{
log {
output stderr
format console
}
}
{"level":"info","ts":1772012872.3660452,"msg":"maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined"}
{"level":"info","ts":1772012872.366279,"msg":"GOMEMLIMIT is updated","package":"github.com/KimMachineGun/automemlimit/memlimit","GOMEMLIMIT":29882068992,"previous":9223372036854775807}
{"level":"info","ts":1772012872.3663979,"msg":"using config from file","file":"/etc/frankenphp/Caddyfile"}
{"level":"info","ts":1772012872.3690062,"msg":"adapted config to JSON","adapter":"caddyfile"}
{"level":"warn","ts":1772012872.36905,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/frankenphp/Caddyfile","line":2}
2026/02/25 09:47:52.369 WARN admin admin endpoint disabled
2026/02/25 09:47:52.370 INFO http.auto_https automatic HTTPS is completely disabled for server {"server_name": "srv0"}
2026/02/25 09:47:52.370 INFO http.auto_https automatic HTTPS is completely disabled for server {"server_name": "srv1"}
2026/02/25 09:47:52.370 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000632180"}
2026/02/25 09:47:52.431 INFO frankenphp FrankenPHP started 🐘 {"php_version": "8.2.30", "num_threads": 32, "max_threads": 32}
2026/02/25 09:47:52.434 INFO http.log server running {"name": "srv0", "protocols": ["h1"]}
2026/02/25 09:47:52.434 INFO http.log server running {"name": "srv1", "protocols": ["h1"]}
{"level":"info","ts":1772012872.434528,"msg":"serving initial configuration"}
Is there a way to avoid this mix of formats?
3. Caddy version: v2.10.2
With frankenphp plugin 1.11.1
4. How I installed and ran Caddy:
a. System environment:
Docker Container, with a debian trixie base image.
Custom build with xcaddy.
b. Command:
frankenphp run --config /etc/frankenphp/Caddyfile --adapter caddyfile