diff --git a/autopilot/contractor/contractor.go b/autopilot/contractor/contractor.go index afe7c1855..3b9ff66ec 100644 --- a/autopilot/contractor/contractor.go +++ b/autopilot/contractor/contractor.go @@ -825,7 +825,7 @@ func performContractChecks(ctx *mCtx, alerter alerts.Alerter, s Database, churn // check usability if !host.Checks.UsabilityBreakdown.IsUsable() { - logger.Info("unusable host") + logger.Debug("unusable host") updateUsability(ctx, host, cm, api.ContractUsabilityBad, host.Checks.UsabilityBreakdown.String()) continue } diff --git a/autopilot/contractor/hostset.go b/autopilot/contractor/hostset.go index a0a8e0118..87c0d263a 100644 --- a/autopilot/contractor/hostset.go +++ b/autopilot/contractor/hostset.go @@ -72,7 +72,7 @@ func (hs *hostSet) HasRedundantIP(ctx context.Context, host api.Host) bool { // the scanning code will lead to the host being marked as offline. resolvedAddresses, err := hs.resolveHostIP(ctx, host) if err != nil { - logger.With(zap.Error(err)).Error("failed to resolve host ips - not redundant") + logger.With(zap.Error(err)).Warn("failed to resolve host ips - not redundant") return false } diff --git a/autopilot/pruner/pruning.go b/autopilot/pruner/pruning.go index ad0ce2510..2129f32c5 100644 --- a/autopilot/pruner/pruning.go +++ b/autopilot/pruner/pruning.go @@ -223,7 +223,9 @@ func (p *Pruner) performContractPruning(ctx context.Context) { } // log total pruned - log.Info(fmt.Sprintf("pruned %d (%s) from %v contracts", total, humanReadableSize(int(total)), len(prunable))) + if total > 0 { + log.Info(fmt.Sprintf("pruned %d (%s) from %v contracts", total, humanReadableSize(int(total)), len(prunable))) + } } func (p *Pruner) pruneContract(ctx context.Context, fcid types.FileContractID, hk types.PublicKey, hostVersion, hostRelease string, logger *zap.SugaredLogger) (uint64, error) { @@ -274,7 +276,7 @@ func (p *Pruner) pruneContract(ctx context.Context, fcid types.FileContractID, h // handle logs if res.Error != "" { log.Errorw("unexpected error interrupted pruning", zap.Error(errors.New(res.Error))) - } else { + } else if res.Pruned > 0 { log.Info("successfully pruned contract") } diff --git a/bus/scanning.go b/bus/scanning.go index 2c160235e..77361a150 100644 --- a/bus/scanning.go +++ b/bus/scanning.go @@ -93,9 +93,9 @@ func (b *Bus) scanHostV1(ctx context.Context, timeout time.Duration, hostKey typ logger = logger.With("elapsed", duration).With(zap.Error(err)) if err == nil { - logger.Info("successfully scanned host on second try") + logger.Debug("successfully scanned host on second try") } else if !isErrHostUnreachable(err) { - logger.Infow("failed to scan host") + logger.Debugw("failed to scan host") } } diff --git a/internal/accounts/accounts.go b/internal/accounts/accounts.go index 1acbcce43..927374134 100644 --- a/internal/accounts/accounts.go +++ b/internal/accounts/accounts.go @@ -382,7 +382,7 @@ func (a *Manager) refillAccounts() { a.mu.Unlock() if err != nil && shouldLog { - a.logger.Errorw("failed to refill account for host", zap.Stringer("hostKey", contract.HostKey), zap.Error(err)) + a.logger.Warnw("failed to refill account for host", zap.Stringer("hostKey", contract.HostKey), zap.Error(err)) } else if refilled { a.logger.Infow("successfully refilled account for host", zap.Stringer("hostKey", contract.HostKey), zap.Error(err)) } @@ -623,7 +623,7 @@ func (a *Account) setBalance(balance *big.Int) { a.acc.RequiresSync = false // log account changes - a.logger.Infow("account balance was reset", + a.logger.Debugw("account balance was reset", zap.Stringer("account", a.acc.ID), zap.Stringer("host", a.acc.HostKey), zap.Stringer("balanceBefore", prevBalance),