Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to increase severity to filter logs #192

Open
pie-r opened this issue Oct 27, 2020 · 1 comment
Open

How to increase severity to filter logs #192

pie-r opened this issue Oct 27, 2020 · 1 comment

Comments

@pie-r
Copy link

pie-r commented Oct 27, 2020

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 pie-r changed the title How to increasi severity to filter logs How to increase severity to filter logs Oct 27, 2020
@pie-r
Copy link
Author

pie-r commented Oct 27, 2020

After some hours, I found the right way:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant