#1085233 fail2ban: doesn't respect logtarget setting in jail.local

#1085233#5
Date:
2024-10-17 06:35:24 UTC
From:
To:
Dear Maintainer,

Setting logtarget in jail.local doesn't have any effect.
I wanted to log to the systemd journal via:
logtarget = STDOUT
in /etc/fail2ban/jail.local

but this setting isn't used:
# fail2ban-client get logtarget
Current logging target is:
`- /var/log/fail2ban.log

#1085233#10
Date:
2025-01-06 10:50:09 UTC
From:
To:
Hi Jens,

this configuration needs to be set in the general configration file,
which on of /etc/fail2ban/fail2ban.conf, /etc/fail2ban/fail2ban.local
or an conf/local file in /etc/fail2ban/fail2ban.d.

Example:
# cat /etc/fail2ban/fail2ban.d/logging.local
[DEFAULT]
logtarget = STDOUT
loglevel = INFO


Regards,
Kevin Woldt