title: JBoss server.log parsing in stream
body: <p>There is a need to parse server log, to gather all Errors and Warnings and detect when Broken Pipe error occurs among others</p>
  <p>The following command does this perfectly when I'm talking about post processing</p>
  <pre><code>cat server.log |grep 'ERROR\|WARN' -A1 |grep -v 'Timed out waiting for last message'|grep -v -- &quot;^--$&quot; |grep -v 'DEBUG'|sed 'N;s/\n/ /'
  </code></pre>
  <p>and gives result like:</p>
  <blockquote>
  <p>2021-03-16 15:26:57,128 ERROR [org.jboss.remoting.transport.socket.ServerThread] Worker thread initialization failure java.io.IOException: Broken pipe</p>
  </blockquote>
  <blockquote>
  <p>2021-03-16 15:26:57,129 ERROR [org.jboss.remoting.transport.socket.ServerThread] Worker thread initialization failure java.io.IOException: Connection reset</p>
  </blockquote>
  <p>but when i'm trying to make same using tail</p>
  <pre><code>tail -f server.log |grep 'ERROR\|WARN' -A1 |grep -v 'Timed out waiting for last message'|grep -v -- '^--$' |grep -v 'DEBUG'|sed 'N;s/\n/ /'
  </code></pre>
  <p>nothing works as expected.</p>
  <p>The problem that I need in one line date time and error type and exception text</p>