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,7 @@ func (m *Manager) Toggle(ctx context.Context, provider, target string, enable bo
|
||||
|
||||
start := time.Now()
|
||||
if err := handler.Apply(ac); err != nil {
|
||||
m.logger.Printf("[ERROR] [integrations] Integration %s apply failed: %v", key, err)
|
||||
if m.isDebug() {
|
||||
m.logger.Printf("[DEBUG] [integrations] Toggle: Apply failed for %s in %v: %v", key, time.Since(start), err)
|
||||
}
|
||||
@@ -210,6 +211,7 @@ func (m *Manager) ListForProvider(providerSlug string) []StatusInfo {
|
||||
func (m *Manager) buildApplyContext(provider, target string) (*ApplyContext, error) {
|
||||
provStack, ok := m.stacks.GetStack(provider)
|
||||
if !ok {
|
||||
m.logger.Printf("[WARN] [integrations] Failed to build context for %s:%s: provider stack not found", provider, target)
|
||||
return nil, fmt.Errorf("szolgáltató stack %q nem található", provider)
|
||||
}
|
||||
|
||||
@@ -299,6 +301,7 @@ func (m *Manager) loadDecryptedEnv(s *stacks.Stack) map[string]string {
|
||||
stackDir := filepath.Dir(s.ComposePath)
|
||||
cfg := stacks.LoadAppConfig(stackDir)
|
||||
if cfg == nil {
|
||||
m.logger.Printf("[WARN] [integrations] Failed to load env for %s: app config is nil", s.Name)
|
||||
return nil
|
||||
}
|
||||
if m.encKey != nil {
|
||||
|
||||
Reference in New Issue
Block a user