feat: comprehensive INFO/WARN/ERROR logging across all controller modules
Add structured operational logging at INFO, WARN, and ERROR levels to every controller module. Standardize custom prefixes ([GEO], [SCHED], [SYNC]) to use [INFO/WARN/ERROR] [module] format. Fix misleveled logs (WARN->ERROR for data loss scenarios, WARN->INFO for routine operations). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -125,6 +125,8 @@ func (p *Pusher) Push(report *Report) error {
|
||||
lastErr = fmt.Errorf("HTTP %d", resp.StatusCode)
|
||||
}
|
||||
|
||||
p.logger.Printf("[WARN] [report] Push failed: %v", lastErr)
|
||||
|
||||
p.statusMu.Lock()
|
||||
p.status.LastError = lastErr.Error()
|
||||
p.status.Consecutive++
|
||||
@@ -186,6 +188,7 @@ func (p *Pusher) PushInfraBackup(data []byte) error {
|
||||
}
|
||||
}
|
||||
|
||||
p.logger.Printf("[WARN] [report] InfraBackup push failed: %v", lastErr)
|
||||
return fmt.Errorf("infra backup push failed after 3 attempts: %w", lastErr)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user