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

level detection: extracting level from nested json #15822

Open
ashwanthgoli opened this issue Jan 17, 2025 · 0 comments
Open

level detection: extracting level from nested json #15822

ashwanthgoli opened this issue Jan 17, 2025 · 0 comments

Comments

@ashwanthgoli
Copy link
Contributor

Describe the bug

Level detection currently only looks at the top level keys of a json for level or serverity keys. It fails to extract level information from nested fields. Even the fallback that searches the log line for level tokens does not handle all scenarios.

Following log line for example does not get detected as warn since this function detectLevelFromLogLine is not exhaustive.

{
    "body": {
        "message": "foo",
        "level": "warn"
    }
}
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