title: Logstash stdout - write into file
body: <p>Am using logstash to get data from Oracle DB to Elastic Search. I used <code>stdout { codec =&gt; rubydebug }</code> its printing log in console. I want to write into a file.</p>
  
  <p>How can we write the log into a file.</p>
  
  <p>Please find my logstash config file.</p>
  
  <pre><code>input {
    jdbc {
      jdbc_driver_library =&gt; "D:\1SearchEngine\data\ojdbc8.jar"
      jdbc_driver_class =&gt; "Java::oracle.jdbc.OracleDriver"
      jdbc_connection_string =&gt; "jdbc:oracle:thin:@localhost:1521:XE"
      jdbc_user =&gt; "demo"
      jdbc_password =&gt; "1234567"
      statement =&gt; "select * from product"    
  
  
   }
  }
  
  output {
  
       stdout { codec =&gt; rubydebug }  
  
    elasticsearch {
      hosts =&gt; ["localhost:9200"]
      index =&gt; "replacement"
      document_id =&gt; "%{ID}"
    }
  }
  </code></pre>