I'm using HAProxy on Debian 12, and while things are running smoothly, I'm frustrated that all my access logs (the HTTP request lines) are ending up in journald. I've installed rsyslog on my Debian system and successfully get the logs there too, but I'd prefer not to have them in journald.
In my previous setup with Ubuntu 22.04, the access logs didn't get recorded in journald; instead, they only appeared in the log files specified under rsyslog.d. I noticed system logs like 'service haproxy restarted' or 'frontend x resumed' did show up in journald, which is fine, but I want to avoid the massive number of access lines being logged there.
Can anyone help me figure out why this is happening or how I can exclude access logs from journald while still retaining all other system/service logs?
1 Answer
Check the HAProxy.service file on your old machine. It might have a separate logging namespace configured for journald, like `LogNamespace=SomeNameSpace`. You can adjust the logging with a config file by navigating to `/etc/systemd`, copying the journald configuration, and editing it. Look into settings like `Storage=` and `ForwardToSyslog=` to manage what gets logged where.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures