func()

in internal/pkg/loggerfactory/loggerfactory.go [87:104]


func (cm *ConfigManager) SetSlogHandlerConfig(config SlogHandlerConfig) {
	// Make a copy of registered components to avoid holding the lock during notification
	var componentsToNotify []LoggerUser

	cm.mu.Lock()
	cm.slogHandlerConfig = config

	// Create a copy of the components to notify
	for _, component := range cm.registeredComponents {
		componentsToNotify = append(componentsToNotify, component)
	}
	cm.mu.Unlock()

	// Notify components after releasing the lock
	for _, component := range componentsToNotify {
		component.UpdateLogger()
	}
}