title: Logstash drop filter for event
body: <p>In my log file I have entries like the following:</p>
  
  <pre><code>2014-06-25 12:36:18,176 [10] ((null)) INFO  [s=(null)] [u=(null)] Hello from Serilog, running as "David"! [Program] 
  2014-06-25 12:36:18,207 [10] ((null)) WARN  [s=(null)] [u=(null)] =======MyOwnLogger====== Hello from log4net, running as David! [MyOwnLogger] 
  2014-06-25 12:36:18,209 [10] ((null)) ERROR [s=(null)] [u=(null)] =======MyOwnLogger====== Hello from log4net, running as David! [MyOwnLogger] 
  </code></pre>
  
  <p>which are of loglevel INFO, WARN and ERROR respectively. </p>
  
  <p>What I would like to do is to only output to Elasticsearch those entries which are of ERROR level. Here is my Logstash configuration file:</p>
  
  <pre><code>input {
      file {
          path =&gt; "Somepath/*.log"
      }
  }
  
  # This filter doesn't work
  filter {
    if [loglevel] != "error" { 
      drop { } 
    }
  }
  
  output {
      elasticsearch { host =&gt; localhost }
      stdout {}
  }
  </code></pre>
  
  <p>Effectively, currently nothing gets sent to Elasticsearch. I know it is related to the filter because if it's not there, all the entries get sent to Elastisearch. </p>