title: Laravel Parsing log with elk (elasticsearch, logstash, kibana)
body: <p>I have configured ELK successfully for Laravel app, But we are facing issue with Laravel log. I have configured logstash template with below code. but I am receiving  Break line in Kibana. I have tried two different configuration code as per below details.</p>
  
  <blockquote>
    <p>20-laravel.conf </p>
  </blockquote>
  
  <pre><code>input {
  stdin{
      codec =&gt; multiline {
          pattern =&gt; "^\["
          what =&gt; "previous"
          negate =&gt; true
      }
  }
  }
  
  filter {
  grok {
      match =&gt; { "message" =&gt; "\[%{TIMESTAMP_ISO8601:timestamp}\] %{DATA:env}\.%{DATA:severity}: %{DATA:message}" }
  }
  }
  
  output {
  elasticsearch {
      document_type =&gt; "logs"
      hosts =&gt; ["127.0.0.1"]
      index =&gt; "laravel_logs"
  }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>filter {
   # Laravel log files
  if [type] == "laravel" {
  grok {
    match =&gt; { "message" =&gt; "\[%{TIMESTAMP_ISO8601:timestamp}\] %{DATA:env}\.%{DATA:severity}: %{DATA:message} \[" }
      }
    }
   }
  </code></pre>
  
  <blockquote>
    <p>laravel sample log is :</p>
  </blockquote>
  
  <pre><code>[2017-09-13 16:19:28] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Parse error: syntax error, unexpected identifier (T_STRING), expecting ',' or ')' in /var/www/app/Http/Controllers/BrandsController.php:57
  Stack trace:
  #0 /var/www/vendor/composer/ClassLoader.php(322): 
   Composer\Autoload\includeFile('/var/www/vendor...')
   #1 [internal function]: Composer\Autoload\ClassLoader-
  &gt;loadClass('App\\Http\\Contro...')
  #2 [internal function]: spl_autoload_call('App\\Http\\Contro...')
  </code></pre>
  
  <blockquote>
    <p>So my main issue is we are reciveing this log in kibana in single line. for example above log code is a divided in  different line message and we can't figure out that which line message is from which error?</p>
  </blockquote>
  
  <p>Kibana log output for single laravel log is displayed in below image.<a href="https://i.stack.imgur.com/TpgLv.jpg" rel="nofollow noreferrer">kibana log-output</a></p>