code: private void logProperties(@NotNull final String header, @NotNull final Properties properties) {
          if (LOGGER.isDebugEnabled()) {
              final StringWriter sw = new StringWriter();
              try (final PrintWriter pw = new PrintWriter(sw)) {
                  pw.format("%s:%n%n", header);
                  final Enumeration<?> e = properties.propertyNames();
                  while (e.hasMoreElements()) {
                      final String key = (String) e.nextElement();
                      if (key.contains("password")) {
                          pw.format("%s='*****'%n", key);
                      } else {
                          final String value = properties.getProperty(key);
                          if (value != null) {
                              pw.format("%s='%s'%n", key, value);
                          }
                      }
                  }
                  pw.flush();
                  LOGGER.debug(sw.toString());
              }
  
          }
      }
docs: Logs the properties. This will not log any properties that contain
  'password' in the key.
  
  @param header the header to print with the log message
  @param properties the properties to log