Aruna Karunarathna
Aruna Karunarathna

Reputation: 1021

Grok pattern for the following log4j pattern

How to construct the grok pattern for the following log4j pattern?

%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n

Upvotes: 0

Views: 416

Answers (1)

Aruna Karunarathna
Aruna Karunarathna

Reputation: 1021

I've come up with a pattern and posing as a reference for others.

match => { "message" => "%{TIME:Time}\s* %{LOGLEVEL:LogLevel}?\s* %{DATA:Thread}?\s*: %{GREEDYDATA:Message}?\s*"}

Upvotes: 0

Related Questions