# Logstash log output config and location

**URL:** <https://discuss.elastic.co/t/logstash-log-output-config-and-location/48902>\
**Category:** Logstash\
**Created:** [May 2, 2016, 3:00am UTC](https://discuss.elastic.co/t/logstash-log-output-config-and-location/48902 "2016-05-02T03:00:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregoryo](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@gregoryo](https://discuss.elastic.co/u/gregoryo)\
**Post date:** [May 2, 2016, 3:00am UTC](https://discuss.elastic.co/t/logstash-log-output-config-and-location/48902/1 "2016-05-02T03:00:37Z")

</div>

Continuing the discussion from [`service logstash start` doesn't work](https://discuss.elastic.co/t/service-logstash-start-doesnt-work/48384/2):

I can't find where logstash writes its own logs. I created /var/log/logstash with temporary 0777 permissions, and restarted logstash. Nothing is written there. This is on a FreeBSD 10.x amd64 machine, if that changes anything.

TIA,  
Greg.

---

<div class="post-metadata">

**Author:** ![fbaligand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fbaligand/32/5657_2.png) [@fbaligand](https://discuss.elastic.co/u/fbaligand)\
**Post date:** [May 2, 2016, 5:15pm UTC](https://discuss.elastic.co/t/logstash-log-output-config-and-location/48902/2 "2016-05-02T17:15:37Z")

</div>

By default, logstash writes to console.  
But you can write logs to a file using : `bin/logstash -l /path/to/file.log ...`

---

<div class="post-metadata">

**Author:** ![gregoryo](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@gregoryo](https://discuss.elastic.co/u/gregoryo)\
**Post date:** [May 3, 2016, 3:16am UTC](https://discuss.elastic.co/t/logstash-log-output-config-and-location/48902/3 "2016-05-03T03:16:33Z")

</div>

Ah of course, I hadn't thought of that (since I'm used to logs, by default, being written to log files). I found the relevant info in the daemon run command file: `/usr/local/etc/rc.d/logstash`

In there I found I could set `logstash_log="YES"` in `/etc/rc.conf` or `/etc/rc.conf.d/logstash` and then after a daemon restart, the log file `/var/log/logstash.conf` appears as expected.

Anyway, thank you. Problem solved.

---

<div class="post-metadata">

**Author:** ![fbaligand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fbaligand/32/5657_2.png) [@fbaligand](https://discuss.elastic.co/u/fbaligand)\
**Post date:** [May 3, 2016, 6:09am UTC](https://discuss.elastic.co/t/logstash-log-output-config-and-location/48902/4 "2016-05-03T06:09:30Z")

</div>

Nice 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:59am UTC](https://discuss.elastic.co/t/logstash-log-output-config-and-location/48902/5 "2017-07-06T04:59:38Z")

</div>


