Merge pull request #3013 from sinkingpoint/sinkingpoint/log_change
Move api error logs to debug
This commit is contained in:
commit
c732372d7d
|
@ -227,14 +227,14 @@ func (api *API) getAlertsHandler(params alert_ops.GetAlertsParams) middleware.Re
|
|||
|
||||
matchers, err := parseFilter(params.Filter)
|
||||
if err != nil {
|
||||
level.Error(logger).Log("msg", "Failed to parse matchers", "err", err)
|
||||
level.Debug(logger).Log("msg", "Failed to parse matchers", "err", err)
|
||||
return alertgroup_ops.NewGetAlertGroupsBadRequest().WithPayload(err.Error())
|
||||
}
|
||||
|
||||
if params.Receiver != nil {
|
||||
receiverFilter, err = regexp.Compile("^(?:" + *params.Receiver + ")$")
|
||||
if err != nil {
|
||||
level.Error(logger).Log("msg", "Failed to compile receiver regex", "err", err)
|
||||
level.Debug(logger).Log("msg", "Failed to compile receiver regex", "err", err)
|
||||
return alert_ops.
|
||||
NewGetAlertsBadRequest().
|
||||
WithPayload(
|
||||
|
@ -356,7 +356,7 @@ func (api *API) getAlertGroupsHandler(params alertgroup_ops.GetAlertGroupsParams
|
|||
|
||||
matchers, err := parseFilter(params.Filter)
|
||||
if err != nil {
|
||||
level.Error(logger).Log("msg", "Failed to parse matchers", "err", err)
|
||||
level.Debug(logger).Log("msg", "Failed to parse matchers", "err", err)
|
||||
return alertgroup_ops.NewGetAlertGroupsBadRequest().WithPayload(err.Error())
|
||||
}
|
||||
|
||||
|
@ -494,7 +494,7 @@ func (api *API) getSilencesHandler(params silence_ops.GetSilencesParams) middlew
|
|||
for _, matcherString := range params.Filter {
|
||||
matcher, err := labels.ParseMatcher(matcherString)
|
||||
if err != nil {
|
||||
level.Error(logger).Log("msg", "Failed to parse matchers", "err", err)
|
||||
level.Debug(logger).Log("msg", "Failed to parse matchers", "err", err)
|
||||
return alert_ops.NewGetAlertsBadRequest().WithPayload(err.Error())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue