(oldCfg, newCfg *config.Config)
| 1467 | } |
| 1468 | |
| 1469 | func 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 | |
| 1489 | func (s *Service) startHomeUsageForwarder(ctx context.Context, client *home.Client) { |
| 1490 | if s == nil || client == nil { |
no test coverage detected