Multi-line pattern matching help

I am trying to capture the following log using multiline pattern.
If I try to capture it with date '^\d{4}-\d{2}-\d{2}' then all the logs (not multine) also get concatenated.
If I try to capture with '^[[:space:]]+|^at' then I miss the previous line which has the date and log level.

2017-06-07 00:01:22,597 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: error processing READ_BLOCK operation  src: / dst: / 240000 millis timeout while waiting for channel to be ready for write. ch : java.nio.channels.SocketChannel[connected local=/ remote=/]
	at org.apache.hadoop.hdfs.server.datanode.BlockSender.sendPacket(
	at org.apache.hadoop.hdfs.server.datanode.BlockSender.sendBlock(
	at org.apache.hadoop.hdfs.server.datanode.DataXceiver.readBlock(
	at org.apache.hadoop.hdfs.protocol.datatransfer.Receiver.opReadBlock(
	at org.apache.hadoop.hdfs.protocol.datatransfer.Receiver.processOp(

Solved it using:

  multiline.pattern: '^\d{4}-\d{2}-\d{2}'
  multiline.negate: True
  multiline.match: after
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.