diff options
Diffstat (limited to 'src/net/java/sip/communicator')
-rw-r--r-- | src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java b/src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java index b16e2ea..7ba362e 100644 --- a/src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java +++ b/src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java @@ -22,6 +22,7 @@ import java.io.*; import java.sql.*; import java.sql.Statement; import java.util.*; +import java.util.regex.Pattern; import org.jitsi.service.configuration.*; import org.jitsi.service.fileaccess.*; @@ -952,4 +953,34 @@ public final class JdbcConfigService l.propertyChange(evt); } } + + @Override + public void logConfigurationProperties(String excludePattern) + { + if (!logger.isInfoEnabled()) + return; + + Pattern exclusion = null; + if (!StringUtils.isNullOrEmpty(excludePattern)) + { + exclusion = Pattern.compile( + excludePattern, Pattern.CASE_INSENSITIVE); + } + + for (String p : getAllPropertyNames()) + { + Object v = getProperty(p); + + // Not sure if this can happen, but just in case... + if (v == null) + continue; + + if (exclusion != null && exclusion.matcher(p).find()) + { + v = "**********"; + } + + logger.info(p + "=" + v); + } + } } |