Files
darkexplosiveqwx 465a44a9a3 breaking: make webserver.log more useful & align with FTL.log
Webserver-scoped log lines now carry the same severity prefix and
process/thread ID format as FTL.log. log_web() gained (priority, flag)
arguments - log_web(priority, ...) for plain messages and
log_web_debug(flag, ...) for gated debug output - and both are emitted
to the FIFO buffer and webserver.log. Call sites across the API and the
web server were moved over, keeping process-health messages in FTL.log.

Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>

x509: keep TLS log messages in FTL.log

The TLS problems in x509.c are process-health signals ("HTTPS is broken")
and belong in FTL.log. The earlier move to log_web()/webserver.log also
made the file inconsistent within one function: set_name() and the fchmod()
warning in write_to_file() are reached only from generate_certificate(),
whose other failure sites all stayed log_err(). --read-x509 output only
stays clean because args.c disables file logging before the call.

Revert all log sites here to _FTL_log().

Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>

weblog: decide whether to relay before printing to stdout

_log_web() printed to stdout and then, when the web log file could not be
opened, handed the message to _FTL_log(), which prints to stdout under the
same condition. On a foreground run with an unwritable files.log.webserver
every relayed error showed up twice on the console.

Compute whether we relay (print_log set, no web log available, severity
WARNING or worse) before printing anything and let _FTL_log() own the
whole message - stdout, FIFO, FTL.log/syslog - in that case.

Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
2026-08-08 18:07:48 +02:00
..