# Problems with logstash doc example

**URL:** <https://discuss.elastic.co/t/problems-with-logstash-doc-example/41720>\
**Category:** Logstash\
**Created:** [February 14, 2016, 3:01pm UTC](https://discuss.elastic.co/t/problems-with-logstash-doc-example/41720 "2016-02-14T15:01:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![guojingjing](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guojingjing/32/8205_2.png) [@guojingjing](https://discuss.elastic.co/u/guojingjing)\
**Post date:** [February 14, 2016, 3:01pm UTC](https://discuss.elastic.co/t/problems-with-logstash-doc-example/41720/1 "2016-02-14T15:01:01Z")

</div>

I'm an absolute beginner of Logstash.

I ran the second example with _logstash-apache.conf_ on [https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html](https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html). It seems that my file was found (and possibly opened); but I ran into two issues.

1. the stdout {} did not seem to work, i.e. after logstash startup was completed, the cmd window output nothing.
2. when I tried to add more lines in the files being monitored, the changes can not be saved.

Anyone care to give a hint? Thanks!

---

<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:** [February 14, 2016, 4:07pm UTC](https://discuss.elastic.co/t/problems-with-logstash-doc-example/41720/2 "2016-02-14T16:07:27Z")

</div>

1. That's probably because Logstash is tailing the input file. Were lines added to the file while Logstash since Logstash started?
2. I don't understand what you mean by "changes cannot be saved". Exactly how did you attempt to add lines to the file? I'm guessing you tried to use a text editor, but don't do that. Use e.g. `echo "content of line" >> /path/to/logfile` instead.

---

<div class="post-metadata">

**Author:** ![guojingjing](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guojingjing/32/8205_2.png) [@guojingjing](https://discuss.elastic.co/u/guojingjing)\
**Post date:** [February 15, 2016, 9:49am UTC](https://discuss.elastic.co/t/problems-with-logstash-doc-example/41720/3 "2016-02-15T09:49:25Z")

</div>

it turns out my problem is due to the directory being incorrect. My log file did not have the ".log" extension and it couldn't be read properly.

and the _echo_ command worked. Originally I opened the log file and changed it manually when I tried to save it, it then popped "change cannot be saved" message.

All is good now. Thanks a lot!

---

<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, 5:11am UTC](https://discuss.elastic.co/t/problems-with-logstash-doc-example/41720/4 "2017-07-06T05:11:31Z")

</div>


