Log config property changes only if they really change
This prevents spam from previous property loading addition Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -372,8 +372,6 @@ public class ConfigManager
|
||||
|
||||
public void setConfiguration(String groupName, String key, String value)
|
||||
{
|
||||
log.debug("Setting configuration value for {}.{} to {}", groupName, key, value);
|
||||
|
||||
String oldValue = (String) properties.setProperty(groupName + "." + key, value);
|
||||
|
||||
if (Objects.equals(oldValue, value))
|
||||
@@ -381,6 +379,8 @@ public class ConfigManager
|
||||
return;
|
||||
}
|
||||
|
||||
log.debug("Setting configuration value for {}.{} to {}", groupName, key, value);
|
||||
|
||||
synchronized (pendingChanges)
|
||||
{
|
||||
pendingChanges.put(groupName + "." + key, value);
|
||||
@@ -415,8 +415,6 @@ public class ConfigManager
|
||||
|
||||
public void unsetConfiguration(String groupName, String key)
|
||||
{
|
||||
log.debug("Unsetting configuration value for {}.{}", groupName, key);
|
||||
|
||||
String oldValue = (String) properties.remove(groupName + "." + key);
|
||||
|
||||
if (oldValue == null)
|
||||
@@ -424,6 +422,8 @@ public class ConfigManager
|
||||
return;
|
||||
}
|
||||
|
||||
log.debug("Unsetting configuration value for {}.{}", groupName, key);
|
||||
|
||||
synchronized (pendingChanges)
|
||||
{
|
||||
pendingChanges.put(groupName + "." + key, null);
|
||||
|
||||
Reference in New Issue
Block a user