Skip to content

Commit

Permalink
Merge pull request #87 from utilitywarehouse/as-logging
Browse files Browse the repository at this point in the history
reduced git periodic sync related logging noise
  • Loading branch information
asiyani authored May 16, 2023
2 parents bf98a68 + 847a4fe commit 2f0d492
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (r *Repository) StopSync() {

func (r *Repository) runGitCommand(ctx context.Context, environment []string, cwd string, args ...string) (string, error) {
cmdStr := gitExecutablePath + " " + strings.Join(args, " ")
r.log.Debug("running command", "cwd", cwd, "cmd", cmdStr)
r.log.Trace("running command", "cwd", cwd, "cmd", cmdStr)

cmd := exec.CommandContext(ctx, gitExecutablePath, args...)
if cwd != "" {
Expand Down Expand Up @@ -212,7 +212,7 @@ func (r *Repository) runGitCommand(ctx context.Context, environment []string, cw
if err != nil {
return "", fmt.Errorf("Run(%s): %w: { stdout: %q, stderr: %q }", cmdStr, err, stdout, stderr)
}
r.log.Debug("command result", "stdout", stdout, "stderr", stderr)
r.log.Trace("command result", "stdout", stdout, "stderr", stderr)

return stdout, nil
}
Expand Down Expand Up @@ -281,7 +281,7 @@ func (r *Repository) sync(ctx context.Context) error {
return err
}
if local == remote {
r.log.Debug("no update required", "rev", r.repositoryConfig.Revision, "local", local, "remote", remote)
r.log.Trace("no update required", "rev", r.repositoryConfig.Revision, "local", local, "remote", remote)
return nil
}
r.log.Info("update required", "rev", r.repositoryConfig.Revision, "local", local, "remote", remote)
Expand Down

0 comments on commit 2f0d492

Please sign in to comment.