# How can I log without rsyslog?

**URL:** <https://discourse.haproxy.org/t/how-can-i-log-without-rsyslog/7814>\
**Category:** Configuration Samples\
**Created:** [July 5, 2022, 9:25am UTC](https://discourse.haproxy.org/t/how-can-i-log-without-rsyslog/7814 "2022-07-05T09:25:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnbc66](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dnbc66](https://discourse.haproxy.org/u/dnbc66)\
**Post date:** [July 5, 2022, 9:25am UTC](https://discourse.haproxy.org/t/how-can-i-log-without-rsyslog/7814/1 "2022-07-05T09:25:23Z")

</div>

Haproxy version: 2.0.14

For some reasons I can’t use rsyslog to log, now I just redirect logs to file like this:  
/usr/sbin/haproxy -Ws -f /usr/local/etc/haproxy/haproxy.cfg \>\>/var/log/haproxy.log 2\>&1

In this way, we can’t config and use log format, the log information is quite confusing:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/haproxy/original/2X/5/5e2397d061b2717c41d61c084e3cd4b2787ec58f.png)

we want know if there any configuration we can set in haproxy.cfg to make log more clear without rsyslog. Thanks for your suggestions!

---

<div class="post-metadata">

**Author:** ![Baptiste](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@Baptiste](https://discourse.haproxy.org/u/Baptiste)\
**Post date:** [July 10, 2022, 8:37am UTC](https://discourse.haproxy.org/t/how-can-i-log-without-rsyslog/7814/2 "2022-07-10T08:37:09Z")

</div>

You can make HAProxy logs to stdout with “raw” format:

```
global
  log stdout format raw local0 info

```

And add the relevant `log global` and `option httplog` in the `defaults` or `frontend` sections

---

<div class="post-metadata">

**Author:** ![dnbc66](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dnbc66](https://discourse.haproxy.org/u/dnbc66)\
**Post date:** [July 28, 2022, 3:26am UTC](https://discourse.haproxy.org/t/how-can-i-log-without-rsyslog/7814/3 "2022-07-28T03:26:43Z")

</div>

thanks too much, it works for me
