Closed michaelnordmeyer closed 2 months ago
BTW, the current one log solution already led to Agate introducing two non-spec status codes, 00 TLS error
and 01 IP error
, to be able to log those error scenarios to the log file (see https://github.com/mbrubeck/agate#logging).
I use Agate with systemd, so all logging goes by default to the journal. Because not only resource access logging goes into the journal, it interferes with parsing the log. Example output:
If I switch my systemd's
agate.service
towhich mimics the way nginx is logging and use ordinary log files, then all logging goes to
error.log
, because Agate currently logs tostderr
and notstdout
. If I change theenv_logger
to log tostdout
, then all logging goes toaccess.log
. It looks like this:Journal
Access.log
Error.log
What I would like to have is only user-generated, uniform log lines in
access.log
so I can parse them properly:Access.log
Error.log
I'm not a Rust expert, but I don't see anything in
env_logger
, which could achieve this, except using two different loggers, one forstdout
and one forstderr
.Any ideas or opinions?