blackhole icon indicating copy to clipboard operation
blackhole copied to clipboard

How to increase severity to filter logs

Open pie-r opened this issue 4 years ago • 1 comments

Hi,

I'm trying to use this library but i don't understand how I should configure the input json, to maintain only warning and errors:

Is this possible?

"root": [{
            "type": "blocking",
            "formatter": {
                "type": "string",
                "sevmap": ["D", "I", "W", "E"],
                "pattern": "{timestamp} [{severity}] [{thread}] [{process}] {message} |raw: {...:{{name}={value}:p}s}",
            },
            "sinks": [{
                "type": "console"
            }]
        }]

pie-r avatar Oct 27 '20 15:10 pie-r

After some hours, I found the right way:

"sinks": [{
                "type": "console",
                "filter": {
                    "type": "severity",
                    "threshold": 3
                }
            }]

pie-r avatar Oct 27 '20 15:10 pie-r