Skip to content

Commit

Permalink
fix: fix metrics log format error
Browse files Browse the repository at this point in the history
  • Loading branch information
qinyouzeng committed Jan 2, 2024
1 parent 9bd8933 commit cb5896b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public async Task GetRangeValuesAsync(RangeValueQuery query)
return;
}

_logger.LogError("request failed {data.ErrorType} {data.Error}", data);
_logger.LogError("request failed {data.ErrorType} {data.Error}", data.ErrorType,data.Error);
}

[EventHandler]
Expand All @@ -85,7 +85,7 @@ public async Task GetQueryRangeAsync(RangeQuery query)
});

if (data.Status == ResultStatuses.Error)
_logger.LogError("request failed {data.ErrorType} {data.Error}", data);
_logger.LogError("request failed {data.ErrorType} {data.Error}", data.ErrorType, data.Error);

query.Result = data.Data!;
}
Expand All @@ -101,7 +101,7 @@ public async Task GetQueryAsync(InstantQuery query)
query.Result = data.Data!;
if (data.Status != ResultStatuses.Success)
{
_logger.LogError("request failed {data.ErrorType} {data.Error}", data);
_logger.LogError("request failed {data.ErrorType} {data.Error}", data.ErrorType, data.Error);
}
}

Expand All @@ -122,7 +122,7 @@ public async Task GetMetricsAsync(MetricQuery query)
return;
}

_logger.LogError("request failed {data.ErrorType} {data.Error}", data);
_logger.LogError("request failed {data.ErrorType} {data.Error}", data.ErrorType, data.Error);
}

[EventHandler]
Expand All @@ -144,7 +144,7 @@ public async Task GetLableValuesAsync(LableValuesQuery query)
return;
}

_logger.LogError("request failed {data.ErrorType} {data.Error}", data);
_logger.LogError("request failed {data.ErrorType} {data.Error}", data.ErrorType, data.Error);
}

[EventHandler]
Expand Down

0 comments on commit cb5896b

Please sign in to comment.