Skip to content

Commit

Permalink
Move log statement and change from info to debug
Browse files Browse the repository at this point in the history
The message seems to be informative only to developers i.e. better
suited as a debug message.

Moving it to the function that it is actually logging for ensures that
it is always logged, instead of putting this burden on the caller.
  • Loading branch information
hnnsgstfssn committed Oct 28, 2024
1 parent 0d69595 commit eecb6b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion internal/pkg/githubapi/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ func handleChangedPREvent(ctx context.Context, mainGithubClientPair GhClientPair
ghPrClientDetails.PrLogger.Debugf("Diff not find affected ArogCD apps")
}
}
ghPrClientDetails.PrLogger.Infoln("Checking for Drift")
err = DetectDrift(ghPrClientDetails)
if err != nil {
return fmt.Errorf("detecting drift: %w", err)
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/githubapi/promotion.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func contains(s []string, str string) bool {
}

func DetectDrift(ghPrClientDetails GhPrClientDetails) error {
ghPrClientDetails.PrLogger.Debugln("Checking for Drift")
if ghPrClientDetails.Ctx.Err() != nil {
return ghPrClientDetails.Ctx.Err()
}
Expand Down

0 comments on commit eecb6b7

Please sign in to comment.