1. The problem I’m having:
Log entry for requests with status 400 as ERROR not INFO.
If not possible, how can one specifically write to a log file an entry for a request with status 400 when the log level is set to error?
2. Error messages and/or full log output:
2025/10/20 09:05:46.472 e[34mINFOe[0m http.log.access.log0 handled request {"request": {"remote_ip": "1.2.3.4", "remote_port": "53178", "client_ip": "1.2.3.4", "proto": "HTTP/1.0", "method": "POST", "host": "influxdba.b.c.d", "uri": "/api/v2/write?org=imb&bucket=sensor%2Ddata", "headers": {"Content-Length": ["109"], "Content-Type": ["application/x-www-form-urlencoded"], "User-Agent": ["fhem"], "Accept-Encoding": ["gzip,deflate"], "Authorization": ["REDACTED"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "", "server_name": "influxdba.b.c.d"}}, "bytes_read": 109, "user_id": "", "duration": 0.001252663, "size": 176, "status": 400, "resp_headers": {"Via": ["1.1 Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Content-Type": ["application/json; charset=utf-8"], "X-Influxdb-Build": ["OSS"], "X-Influxdb-Version": ["v2.7.11"], "X-Platform-Error-Code": ["invalid"], "Date": ["Mon, 20 Oct 2025 09:05:46 GMT"], "Content-Length": ["176"]}, "req_body": "temp_a,building=IMB,host=1R1,wing=1,floor=1,sensor=V3OLD,inventory=tempA,room= value=3.2 1760951146000000000\n"}
3. Caddy version:
2.10.0
4. How I installed and ran Caddy:
Docker
a. System environment:
Debian GNU/Linux 13
d. My complete Caddy config:
log {
output file /log/influxdb.log {
mode 644
roll_size 10MiB
}
format console
level debug
# level error
}