fix: standardize log prefixes, remove duplicates, add missing module tags

Second-pass logging cleanup: consistent [LEVEL] [module] format across
all 41 files. Remove stale prefixes ([CF], [SYNC], [SCHED], [API],
[STORAGE], [HEALTH], [ROLLBACK]). Remove 5 duplicate log lines. Gate
ungated DEBUG lines. Fix wrong log levels (restore start WARN→INFO).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-26 21:20:09 +01:00
parent 8e61cd7ec4
commit af1dd14933
41 changed files with 477 additions and 473 deletions
+4 -4
View File
@@ -17,12 +17,12 @@ type zone struct {
// It tries the exact domain first, then strips subdomains progressively.
func (c *Client) GetZoneID(ctx context.Context, domain string) (string, error) {
if c.debug {
c.logger.Printf("[CF-DEBUG] GetZoneID: looking up zone for domain %q", domain)
c.logger.Printf("[DEBUG] [cloudflare] GetZoneID: looking up zone for domain %q", domain)
}
// Try exact domain first (e.g., "demo-felhom.eu")
if c.debug {
c.logger.Printf("[CF-DEBUG] GetZoneID: trying exact domain %q", domain)
c.logger.Printf("[DEBUG] [cloudflare] GetZoneID: trying exact domain %q", domain)
}
id, err := c.lookupZone(ctx, domain)
if err != nil {
@@ -40,7 +40,7 @@ func (c *Client) GetZoneID(ctx context.Context, domain string) (string, error) {
break
}
if c.debug {
c.logger.Printf("[CF-DEBUG] GetZoneID: trying parent domain %q", parent)
c.logger.Printf("[DEBUG] [cloudflare] GetZoneID: trying parent domain %q", parent)
}
id, err = c.lookupZone(ctx, parent)
if err != nil {
@@ -73,6 +73,6 @@ func (c *Client) lookupZone(ctx context.Context, name string) (string, error) {
return "", nil
}
c.logger.Printf("[CF] Resolved zone %q → %s", name, zones[0].ID)
c.logger.Printf("[INFO] [cloudflare] Resolved zone %q → %s", name, zones[0].ID)
return zones[0].ID, nil
}