# No Logs (syslog)

**URL:** <https://discourse.haproxy.org/t/no-logs-syslog/2459>\
**Category:** Help!\
**Created:** [May 4, 2018, 12:40pm UTC](https://discourse.haproxy.org/t/no-logs-syslog/2459 "2018-05-04T12:40:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![warnox](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@warnox](https://discourse.haproxy.org/u/warnox)\
**Post date:** [May 4, 2018, 12:40pm UTC](https://discourse.haproxy.org/t/no-logs-syslog/2459/1 "2018-05-04T12:40:25Z")

</div>

Hello,

I’ve added the following config into haproxy.cfg, but no logs seem to be getting sent to the syslog server. I’ve looked through the documentation and previous topics, but not sure what I’m missing.

Version: 1.8.8 2018/04/19

```
global
   #log /dev/log local0
   #log /dev/log local1 notice
   log x.x.x.x:5140 syslog debug
   
defaults
   log global
   option httplog
   option tcplog
   option dontlognull

```

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [May 4, 2018, 12:53pm UTC](https://discourse.haproxy.org/t/no-logs-syslog/2459/2 "2018-05-04T12:53:32Z")

</div>

The default syslog port is 514, not 5140. Maybe that’s it?

---

<div class="post-metadata">

**Author:** ![warnox](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@warnox](https://discourse.haproxy.org/u/warnox)\
**Post date:** [May 4, 2018, 1:10pm UTC](https://discourse.haproxy.org/t/no-logs-syslog/2459/3 "2018-05-04T13:10:57Z")

</div>

The syslog server is listening on 5140 UDP, non default port. Not that easy 🙂

Does the config look ok? I assume at debug level I should be seeing connection logs?

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [May 4, 2018, 1:40pm UTC](https://discourse.haproxy.org/t/no-logs-syslog/2459/4 "2018-05-04T13:40:49Z")

</div>

Yes, config looks ok. You should also see some messages about haproxy and its backends beeing started/stopped while reloading or restarting haproxy.

If you don’t see anything at all, there may be a connectivity issue between haproxy and your syslog server.

Your best bet at this point is tcpdump it.

---

<div class="post-metadata">

**Author:** ![warnox](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@warnox](https://discourse.haproxy.org/u/warnox)\
**Post date:** [May 4, 2018, 8:05pm UTC](https://discourse.haproxy.org/t/no-logs-syslog/2459/5 "2018-05-04T20:05:02Z")

</div>

No idea what happened, but it started working just as I went to tcpdump it. I guess it also doesn’t make sense to have both ‘option httplog’ and ‘option tcplog’ in the default section, since one would take precedence?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [May 4, 2018, 11:32pm UTC](https://discourse.haproxy.org/t/no-logs-syslog/2459/6 "2018-05-04T23:32:07Z")

</div>

httplog should be used for http mode, tcp mode for tcp mode. Not sure what the behavior is when they are competing against each other or with incompatible modes. Just configure it correctly.
