# Is it possible to append date pattern to the name of log file?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-append-date-pattern-to-the-name-of-log-file/62795>\
**Category:** Logstash\
**Created:** [October 12, 2016, 9:44am UTC](https://discuss.elastic.co/t/is-it-possible-to-append-date-pattern-to-the-name-of-log-file/62795 "2016-10-12T09:44:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rayen\_Yang](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Rayen\_Yang](https://discuss.elastic.co/u/Rayen_Yang)\
**Post date:** [October 12, 2016, 9:44am UTC](https://discuss.elastic.co/t/is-it-possible-to-append-date-pattern-to-the-name-of-log-file/62795/1 "2016-10-12T09:44:04Z")

</div>

Now we can add **_--log_** flag to run Logstash in order to write logs to a file,  
just like: --log run.log.

But I want to write logs to another file every day without restart Lostash,  
just like that: --log run-%{+YYYY.MM.dd}.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:34am UTC](https://discuss.elastic.co/t/is-it-possible-to-append-date-pattern-to-the-name-of-log-file/62795/2 "2017-07-06T04:34:36Z")

</div>


