Logstash, if statement

Hi guys,

we are using PINO logger.... as per their docs...

trace: 10,

debug: 20,

info: 30,

warn: 40,

error: 50,

fatal: 60

I am getting logs like ("level":30 ). {"level":30,"time":....,"pid":1,"hostname":"ip"

My requirement is if my getting level 30 means it is info log-level or level 20 means debug log-level.

How to achieve this in logstash grok filter??

Thanks in advance.

We aren't all guys :slight_smile:

https://www.elastic.co/guide/en/logstash/current/config-examples.html#using-conditionals has some examples.

thanks for your reply, is it possible like that? first i want to know that?

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