[systemd-devel] Don't log "logger" messages in to journald

Mantas Mikulėnas grawity at gmail.com
Wed Mar 16 09:03:48 UTC 2016


On Wed, Mar 16, 2016 at 10:52 AM, Stanislav Kopp <staskopp at gmail.com> wrote:

> Hi all,
>
> We have bunch of webservers, where we use "logger" to send apache
> access logs to remote rsyslog, unfortunately these access logs are
> landing in journald too. As we have a lot of requests it's pretty
> unusable to use "journalct" to show system logs. Is there a way to
> tell journald do not log "logger" messages or at least not to show
> them in "journalct" output?
>

Do your "logger" commands actually specify the remote server directly (via
--server), or do they rely on a local syslogd to forward the messages?

If logger sends messages over the network, journald doesn't magically
intercept them in any way.

If logger uses the system default /dev/log (which is handled by journald),
then you could make it _not_ use /dev/log, and instead point `logger
--socket` to the syslog daemon's real socket path (usually
/run/systemd/journald/syslog), bypassing journald's forwarding.

Alternatively, set a --priority value higher than MaxLevelStore – the
highest numerically would be "debug". (The default is to log all
priorities, so you'll need at least MaxLevelStore=info as well.)

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160316/857f1f8b/attachment.html>


More information about the systemd-devel mailing list