mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
explore: don't parse log levels if provided by field or label (#17180)
If a field or a label named level is returned from datasource that is used as log level for the logs result instead of parsing the log level from the message. Closes #17122
This commit is contained in:
committed by
GitHub
parent
04d473b3e5
commit
a07296bf24
@@ -23,6 +23,15 @@ export function getLogLevel(line: string): LogLevel {
|
||||
return LogLevel.unknown;
|
||||
}
|
||||
|
||||
export function getLogLevelFromKey(key: string): LogLevel {
|
||||
const level = (LogLevel as any)[key];
|
||||
if (level) {
|
||||
return level;
|
||||
}
|
||||
|
||||
return LogLevel.unknown;
|
||||
}
|
||||
|
||||
export function addLogLevelToSeries(series: SeriesData, lineIndex: number): SeriesData {
|
||||
return {
|
||||
...series, // Keeps Tags, RefID etc
|
||||
|
||||
Reference in New Issue
Block a user