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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user