MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / logHomeConfigChanges

Function logHomeConfigChanges

sdk/cliproxy/service.go:1469–1487  ·  view source on GitHub ↗
(oldCfg, newCfg *config.Config)

Source from the content-addressed store, hash-verified

1467}
1468
1469func logHomeConfigChanges(oldCfg, newCfg *config.Config) {
1470 if oldCfg == nil || newCfg == nil || !newCfg.Home.Enabled || (!oldCfg.Debug && !newCfg.Debug) {
1471 return
1472 }
1473
1474 details := diff.BuildConfigChangeDetails(oldCfg, newCfg)
1475 if len(details) == 0 {
1476 return
1477 }
1478
1479 if newCfg.Debug && !log.IsLevelEnabled(log.DebugLevel) {
1480 util.SetLogLevel(newCfg)
1481 }
1482
1483 log.Debugf("home config changes detected:")
1484 for _, detail := range details {
1485 log.Debugf(" %s", detail)
1486 }
1487}
1488
1489func (s *Service) startHomeUsageForwarder(ctx context.Context, client *home.Client) {
1490 if s == nil || client == nil {

Callers 1

Calls 2

BuildConfigChangeDetailsFunction · 0.92
SetLogLevelFunction · 0.92

Tested by

no test coverage detected