Skip to content

[BUG] [v0.0.7] Log level filtering uses substring matching, causing false positives #51536

Description

@Tomas38432

Project

cortex

Description

Level filter checks contains(level) on full log line text.

Error Message

Debug Logs

System Information

linux

Screenshots

https://github.com/dragonwarrior0225/img/blob/main/84-4.PNG

Steps to Reproduce

  1. Run cortex logs --level err.
  2. Observe lines with unrelated text containing ERR may match.

Expected Behavior

Filter should parse structured level field (ERROR/WARN/INFO/...) exactly.

Actual Behavior

Substring matching over whole line yields noisy results.

Additional Context

Code Evidence:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingideIssues related to IDEvalidValid issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions