# Prolem with separate logging

**URL:** <https://discourse.haproxy.org/t/prolem-with-separate-logging/6913>\
**Category:** Help!\
**Created:** [September 17, 2021, 10:50am UTC](https://discourse.haproxy.org/t/prolem-with-separate-logging/6913 "2021-09-17T10:50:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TDex](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@TDex](https://discourse.haproxy.org/u/TDex)\
**Post date:** [September 17, 2021, 10:50am UTC](https://discourse.haproxy.org/t/prolem-with-separate-logging/6913/1 "2021-09-17T10:50:51Z")

</div>

Hi guys!

I have a little problem with logging. I tried to follow this( [Introduction to HAProxy Logging - HAProxy Technologies](https://www.haproxy.com/blog/introduction-to-haproxy-logging/) ) article to set up separate logging on my instance but i have a problem. I can seprate the traffic and admin logs but in addition every logs go to syslog as well.  
My haproxy config:

```auto
global
        log 127.0.0.1:514 local0
        chroot /var/lib/haproxy
        stats socket ipv4@127.0.0.1:9999 level admin
        stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
        stats timeout 5m
        user haproxy
        group haproxy
        daemon

```

rsyslog config:

```auto

# Create an additional socket in haproxy's chroot in order to allow logging via
# /dev/log to chroot'ed HAProxy processes
$ModLoad imuxsock
$AddUnixListenSocket /var/lib/haproxy/dev/log

# Send HAProxy messages to a dedicated logfile
#if $programname startswith 'haproxy' then /var/log/haproxy.log
#&~

# Collect log with UDP
$ModLoad imudp
$UDPServerAddress 127.0.0.1
$UDPServerRun 514

# Creating separate log files based on the severity
local0.* /var/log/haproxy/haproxy-traffic.log
local0.notice /var/log/haproxy/haproxy-admin.log

```

If you have any ideas, i welcome you.

---

<div class="post-metadata">

**Author:** ![Rfraile](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@Rfraile](https://discourse.haproxy.org/u/Rfraile)\
**Post date:** [September 17, 2021, 3:12pm UTC](https://discourse.haproxy.org/t/prolem-with-separate-logging/6913/2 "2021-09-17T15:12:47Z")

</div>

Maybe you need to add a line with stop at the end?

`local0.* stop`

---

<div class="post-metadata">

**Author:** ![rhada](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/rhada/32/585_2.png) [@rhada](https://discourse.haproxy.org/u/rhada)\
**Post date:** [September 20, 2021, 8:18am UTC](https://discourse.haproxy.org/t/prolem-with-separate-logging/6913/4 "2021-09-20T08:18:20Z")

</div>

Hello,

we use a pretty close config. At the end of our syslog config we have this line :

```auto
& stop

```

With this, logs should not be sent to syslog after being processed
