Skip to content

Commit

Permalink
Merge pull request #67 from DBezemer/2.4
Browse files Browse the repository at this point in the history
Merging syslog changes into upstream
  • Loading branch information
DBezemer committed Apr 16, 2024
2 parents b190c2b + a6f93e4 commit 7401f0b
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions SOURCES/haproxy.syslog.el7
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ $UDPServerRun 514
$template HAProxy,"%TIMESTAMP% %syslogseverity-text:::UPPERCASE%: %msg:::drop-last-lf%\n"
$template HAProxyAccess,"%msg%\n"

if $programname startswith 'haproxy' then {
if $syslogseverity == 6 then
action(type="omfile" file="/var/log/haproxy/access.log" template="HAProxyAccess")
stop
if $syslogseverity <= 3 then
action(type="omfile" file="/var/log/haproxy/error.log" template="HAProxy")
stop
if $syslogseverity <= 5 then
action(type="omfile" file="/var/log/haproxy/status.log" template="HAProxy")
stop
}
if ($programname startswith 'haproxy' and $inputname == 'imudp') then {
if $syslogseverity == 6 then {
action(type="omfile" file="/var/log/haproxy/access.log" template="HAProxyAccess")
stop
}
if $syslogseverity <= 3 then {
action(type="omfile" file="/var/log/haproxy/error.log" template="HAProxy")
stop
}
if $syslogseverity <= 5 then {
action(type="omfile" file="/var/log/haproxy/status.log" template="HAProxy")
stop
}
}

0 comments on commit 7401f0b

Please sign in to comment.