Просмотр исходного кода

Fix return on `nil` and cleanup debug messages

ichekrygin 9 лет назад
Родитель
Сommit
bbca9861fb
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      pkg/services/alerting/notifiers/victorops.go

+ 1 - 3
pkg/services/alerting/notifiers/victorops.go

@@ -49,7 +49,7 @@ type VictoropsNotifier struct {
 
 // Notify sends notification to Victorops via POST to URL endpoint
 func (this *VictoropsNotifier) Notify(evalContext *alerting.EvalContext) error {
-	this.log.Info("Executing victorops notification", "ruleId", evalContext.Rule.Id, "notification", this.Name, "url", this.URL, "foo", this.AlertOnExecError)
+	this.log.Info("Executing victorops notification", "ruleId", evalContext.Rule.Id, "notification")
 	metrics.M_Alerting_Notification_Sent_Victorops.Inc(1)
 
 	fields := make([]map[string]interface{}, 0)
@@ -80,8 +80,6 @@ func (this *VictoropsNotifier) Notify(evalContext *alerting.EvalContext) error {
 
 	if evalContext.Rule.State == models.AlertStateExecError && !this.AlertOnExecError {
 		return nil
-	} else {
-		return nil
 	}
 
 	body := map[string]interface{}{