[Pkg-haproxy-maintainers] Syslog via /dev/log
Prach Pongpanich
prachpub at gmail.com
Fri Apr 26 05:17:44 UTC 2013
On Fri, Apr 26, 2013 at 4:44 AM, Apollon Oikonomopoulos
<apoikos at gmail.com> wrote:
> Hi,
>
> I just pushed a set of changes to use /dev/log for logging by default. IMHO,
> #649085[1] has a point and we can now support logging out of the box in a
> pristine Debian installation. So, apart from general thoughts and comments
> (which are always welcome), I'd like your opinion on the following
> subjects:
>
> 1. Should postinst attempt to restart rsyslog or not, in order to create
> /dev/log in the chroot? My gut feeling says "no" for a number of reasons
> (at least not without prompting) and my feeling is that the correct
> behaviour would be for the rsyslog package to register a trigger for
> /etc/rsyslog.d/*.
IMO, we should provide /etc/rsyslog.d/??-haproxy.conf and
/etc/logrotate.d/haproxy
# haproxy.cfg
log 127.0.0.1 local0
#/etc/rsyslog.d/??-haproxy.conf
$ModLoad imudp
$UDPServerAddress 127.0.0.1
$UDPServerRun 514
local0.* -/var/log/haproxy.log
& ~
# /etc/logrotate.d/haproxy
/var/log/haproxy.log {
daily
rotate 52
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
invoke-rc.d rsyslog rotate >/dev/null 2>&1 || true
endscript
}
Cheers,
--
Prach Pongpanich
More information about the Pkg-haproxy-maintainers
mailing list