Problems with logstash doc example

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. 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!

  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.

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!