I have some log files generated by Log4J2. I am outputting the logs into a .json file using the JSONLayout in the log4j2.xml configuration file. My JSONLayout is defined like th
You do not need to use the json filter. You can specify the codec format at your input.
input { file { type => "json" path => "/var/logs/myApp/logs.log" codec => json } }
Logstash will automatically parse your log to json format and add the corresponding field.