title: Logstash - Write file per split event
body: <p>I have a Logstash conf where I split an incoming XML into multiple events. I would like to write a file per event. However, the file output writes all the events to a single file (so an event per line). Is there a way to achieve this?</p>
  
  <pre><code>.......
  
  filter {
  
  xml{
     store_xml =&gt; "false"
     source =&gt; "message"
  remove_namespaces =&gt; true
  xpath =&gt; 
   [
  "/root/Envelope", "Envelopes"         
     ]
    }
  
  mutate {
      remove_field =&gt; ["message"]
    }
  
   split{
    field =&gt; "Envelopes"
   }
  }
  
  output {
  file {
  path =&gt; "/install/logstash/output-CL102-%{+yyyyMMddHHmmss}.xml"
  }
  }
  </code></pre>
  
  <p>Thanks</p>