`BICHON_JSON_LOGS` / `--bichon-json-logs` has no effect: logs are always plain text
Describe the bug
The README documents BICHON_JSON_LOGS ("JSON-formatted logs for log aggregators"), but setting it to true does not change the log output: logs stay in the plain text format, both on stdout and in log files.
To reproduce
- Run
rustmailer/bichon:latest(2.0.3) withBICHON_JSON_LOGS=true(andBICHON_ANSI_LOGS=false) - Check
docker logs bichon
Output:
2026-09-30T05:52:35.476+02:00 INFO poem::server: server started name="Bichon Service"
BICHON_ANSI_LOGS=false is applied (no color codes), BICHON_JSON_LOGS=true is not.
Cause
On main (a6c9b15), bichon_json_logs is declared in crates/core/src/settings/cli.rs and exposed in settings/mod.rs, but never read by the logger:
crates/core/src/logger/mod.rs,setup_stdout_logger()only usesbichon_ansi_logsand always builds the text formatter (tracing_subscriber::fmt::format())crates/core/src/logger/file.rsdoes the same for the file logger
Expected behavior
With BICHON_JSON_LOGS=true, output JSON lines (e.g. via tracing_subscriber's .json() formatter, json feature), so that log aggregators such as Loki can read the level from a field instead of guessing it from the text.
Environment
- Bichon 2.0.3, Docker image
rustmailer/bichon:latest - Logs shipped to Loki via Grafana Alloy