Skip to content

Commit

Permalink
change(clean): logging changes and dont show failed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
l3uddz committed Apr 20, 2020
1 parent 6bc954c commit 495bcb4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions uploader/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ func (u *Uploader) Clean(path *pathutils.Path) error {
// handle response
if err != nil {
// error removing
rLog.WithError(err).WithField("exit_code", exitCode).Error("Error")
rLog.WithError(err).WithField("exit_code", exitCode).Error("Error removing remotely")
} else if !success {
// failed
rLog.WithField("exit_code", exitCode).Warn("Failed")
rLog.WithField("exit_code", exitCode).Debugf("Failed removing remotely")
} else {
// cleaned
rLog.Info("Removed")
rLog.Info("Removed remotely")
}
}

Expand All @@ -55,11 +55,11 @@ func (u *Uploader) Clean(path *pathutils.Path) error {
u.Log.
WithField("clean_local_path", path.RealPath).
WithError(err).
Error("Failed")
Error("Failed removing locally")
} else {
u.Log.
WithField("clean_local_path", path.RealPath).
Info("Removed")
Info("Removed locally")
}
}
return nil
Expand Down

0 comments on commit 495bcb4

Please sign in to comment.