blackhole
blackhole copied to clipboard
How to increase severity to filter logs
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"
}]
}]
After some hours, I found the right way:
"sinks": [{
"type": "console",
"filter": {
"type": "severity",
"threshold": 3
}
}]