You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you try to detect the log level from a structured log (ie. json) that has a level and/or severity field set to "warning" or "WARNING", it will not correctly identify it and will instead fall through to the logic in detectLevelFromLogLine. If there is a string anywhere in the log line such as "info" or "error", those levels will be picked first (as the logic is sequential), and the log will be mis-identified.
To Reproduce
Steps to reproduce the behavior:
Started Loki (main)
Submit the following log line
{
"message":"An error occurred using a transaction.",
"level":"WARNING",
"severity":"WARNING"
}
Query the stream
The log will have the detected_field structured metadata field set to error instead of warn
Expected behavior
The log should be labeled as warn.
The text was updated successfully, but these errors were encountered:
Describe the bug
If you try to detect the log level from a structured log (ie. json) that has a
level
and/orseverity
field set to "warning" or "WARNING", it will not correctly identify it and will instead fall through to the logic in detectLevelFromLogLine. If there is a string anywhere in the log line such as "info" or "error", those levels will be picked first (as the logic is sequential), and the log will be mis-identified.To Reproduce
Steps to reproduce the behavior:
main
)detected_field
structured metadata field set toerror
instead ofwarn
Expected behavior
The log should be labeled as
warn
.The text was updated successfully, but these errors were encountered: