# How to set logstash v5 logfile name?

**URL:** <https://discuss.elastic.co/t/how-to-set-logstash-v5-logfile-name/64965>\
**Category:** Logstash\
**Created:** [November 4, 2016, 2:08am UTC](https://discuss.elastic.co/t/how-to-set-logstash-v5-logfile-name/64965 "2016-11-04T02:08:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankh](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@ankh](https://discuss.elastic.co/u/ankh)\
**Post date:** [November 4, 2016, 2:08am UTC](https://discuss.elastic.co/t/how-to-set-logstash-v5-logfile-name/64965/1 "2016-11-04T02:08:04Z")

</div>

For a variety of reasons, I am running a series of logstash jobs to handle a large amount of data in a series of buckets.  
Under 2.4 I used something like:

logstash -f my-index.conf &\> my-index-bucket-100-12000-14000.log

This allowed me to see the outcome of each bucket, and rerun buckets that failed.

Under v5, if I use something like:

logstash --path.logs . -f my-index.conf &\> my-index-bucket-100-12000-14000.log

I get a logfile my-index-bucket-100-12000-14000.log that just contains a message indicating that the logfile is being written elsewhere, and a logfile named logstash-plain.log that contains the interesting stuff.

I can't see how to set that logfile name so I get separate files for each invocation, rather than all jobs appending to the same file. I tried to fully qualify --path.logs with a file name, but that merely creates a directory with that name, and creates logstash-plain.log within the directory. While it's something I could use in a pinch, it's not as useful as having a single directory with multiple logfiles.

I'm using --path.logs in the command as this setting in logstash.yml points to a directory that I can't write to, and that I don't want these logs going to. It complains that the directory is unwriteable unless I use --path.logs. But it appears that using --path.logs changes logstash to direct to logstash-plain.log instead of stdout, which is what I really want/had under 2.4.

Is there a way I can do this?

Thanks!

---

<div class="post-metadata">

**Author:** ![ankh](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@ankh](https://discuss.elastic.co/u/ankh)\
**Post date:** [November 14, 2016, 2:42am UTC](https://discuss.elastic.co/t/how-to-set-logstash-v5-logfile-name/64965/2 "2016-11-14T02:42:27Z")

</div>

Any ideas? I'd really like to keep the logs for each run in a separate file, rather than them all ending up in logstash-plain.log.

---

<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:30am UTC](https://discuss.elastic.co/t/how-to-set-logstash-v5-logfile-name/64965/3 "2017-07-06T04:30:35Z")

</div>


