# Logstash's log files in Windows

**URL:** <https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330>\
**Category:** Logstash\
**Created:** [May 30, 2016, 2:04pm UTC](https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330 "2016-05-30T14:04:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![BanksySan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/banksysan/32/10008_2.png) [@BanksySan](https://discuss.elastic.co/u/BanksySan)\
**Post date:** [May 30, 2016, 2:04pm UTC](https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330/1 "2016-05-30T14:04:32Z")

</div>

Where are the logstash log files in Windows?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 31, 2016, 7:52am UTC](https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330/2 "2016-05-31T07:52:17Z")

</div>

It depends on how Logstash is invoked. The `-l`/`--log` startup option selects the name of the log file.

---

<div class="post-metadata">

**Author:** ![BanksySan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/banksysan/32/10008_2.png) [@BanksySan](https://discuss.elastic.co/u/BanksySan)\
**Post date:** [June 2, 2016, 4:24pm UTC](https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330/3 "2016-06-02T16:24:02Z")

</div>

It's just being run with: `C:\logstash-2.3.2\bin>logstash -f c:\logstash-2.3.2\central.conf`

`central.conf` looks like:

```
input {
    redis {
        host => "XX.XX.XX.XX"
        type => "redis-input"
        data_type => "list"
        key => "logstash"
    }
    beats {
        type => beats
        port => 5044
    }
}

output {
    stdout { }
    elasticsearch { }
}

```

It's straight out of The Logstash Book.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 2, 2016, 4:52pm UTC](https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330/4 "2016-06-02T16:52:41Z")

</div>

Then you'll get the logs to stdout (or possibly stderr, I don't recall).

---

<div class="post-metadata">

**Author:** ![BanksySan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/banksysan/32/10008_2.png) [@BanksySan](https://discuss.elastic.co/u/BanksySan)\
**Post date:** [June 2, 2016, 4:56pm UTC](https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330/5 "2016-06-02T16:56:36Z")

</div>

OK, I do get output to the screen. Do you know what the magic is to output them to a file?.. and how to give that file a max size?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 2, 2016, 5:33pm UTC](https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330/6 "2016-06-02T17:33:28Z")

</div>

> Do you know what the magic is to output them to a file?

Apart from redirecting the process output see my first response to you.

> .. and how to give that file a max size?

Logstash doesn't do log rotation.

---

<div class="post-metadata">

**Author:** ![BanksySan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/banksysan/32/10008_2.png) [@BanksySan](https://discuss.elastic.co/u/BanksySan)\
**Post date:** [June 2, 2016, 5:35pm UTC](https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330/7 "2016-06-02T17:35:01Z")

</div>

OK, cheers. I'll just have to delete them every now and then, that's no biggie.

---

<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:54am UTC](https://discuss.elastic.co/t/logstashs-log-files-in-windows/51330/8 "2017-07-06T04:54:43Z")

</div>


