Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
fix: Correct log level for storing root events (#5075)
Browse files Browse the repository at this point in the history
Signed-off-by: Elisabeth Lang <elisabeth.lang@dynatrace.com>
  • Loading branch information
agrimmer authored and laneli committed Sep 9, 2021
1 parent 114a152 commit 408005f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mongodb-datastore/handlers/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func storeRootEvent(logger *keptncommon.Logger, collectionName string, ctx conte
}
}

logger.Error("Root event for KeptnContext " + event.Shkeptncontext + " already exists in collection")
logger.Info("Root event for KeptnContext " + event.Shkeptncontext + " already exists in collection")
return nil
}

Expand Down Expand Up @@ -314,7 +314,7 @@ func storeContextToProjectMapping(logger *keptncommon.Logger, event *models.Kept
if err != nil {
if writeErr, ok := err.(mongo.WriteException); ok {
if len(writeErr.WriteErrors) > 0 && writeErr.WriteErrors[0].Code == 11000 { // 11000 = duplicate key error
logger.Error("Mapping " + event.Shkeptncontext + "->" + collectionName + " already exists in collection")
logger.Info("Mapping " + event.Shkeptncontext + "->" + collectionName + " already exists in collection")
}
} else {
err := fmt.Errorf("Failed to store mapping "+event.Shkeptncontext+"->"+collectionName+": %v", err.Error())
Expand Down

0 comments on commit 408005f

Please sign in to comment.