func()

in pkg/hotreload/logger.go [29:66]


func (r *LoggerReloader) CheckUpdate(oldConfig, newConfig *model.Bootstrap) bool {
	oc := oldConfig.Log
	nc := newConfig.Log

	if oc == nil && nc != nil {
		return true
	}

	if oc != nil && nc == nil {
		return false
	}

	// Check if any logger configuration fields have changed.
	if oc.Level != nc.Level ||
		oc.Development != nc.Development ||
		oc.DisableCaller != nc.DisableCaller ||
		oc.DisableStacktrace != nc.DisableStacktrace ||
		oc.Encoding != nc.Encoding {
		return true
	}

	// Check sampling configuration.
	if !r.checkSampling(oc.Sampling, nc.Sampling) {
		return true
	}

	// Check encoder configuration.
	if !r.checkEncoderConfig(oc.EncoderConfig, nc.EncoderConfig) {
		return true
	}

	// Check output paths.
	if !equal(oc.OutputPaths, nc.OutputPaths) {
		return true
	}

	return false
}