# Redirect logging to file; not syslog

**URL:** <https://discourse.sensu.io/t/redirect-logging-to-file-not-syslog/1981>\
**Category:** Sensu Go\
**Tags:** sensu-go\
**Created:** [August 4, 2020, 1:42pm UTC](https://discourse.sensu.io/t/redirect-logging-to-file-not-syslog/1981 "2020-08-04T13:42:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [August 4, 2020, 6:00pm UTC](https://discourse.sensu.io/t/redirect-logging-to-file-not-syslog/1981/2 "2020-08-04T18:00:23Z")

</div>

Hey,  
what host OS are you running sensu-agent on?

If you are using something like Centos 6 as the host OS, you should already be using a sysvinit script that is configured to create logs in /var/log/sensu/

If you are running a systemd based linux distro (ex: CentOS 7), you can extend the systemd service definition and instruct systemd to redirect stdout and stderr into a log file of your cholce.

Here’s a recent discourse post that details how to reconfigure your systemd to redirect stdout/stderr to a log file: [SensuGO Agent and Backend Logging](https://discourse.sensu.io/t/sensugo-agent-and-backend-logging/1928/2)

---

_[View the full topic](https://discourse.sensu.io/t/redirect-logging-to-file-not-syslog/1981)._
