code: @Nonnull
      public String printLog4jEffectiveConfiguration() {
          try {
              StringWriter writer = new StringWriter();
              PropertyPrinter propertyPrinter = new PropertyPrinter(new PrintWriter(writer));
              propertyPrinter.print(new PrintWriter(writer));
              return writer.toString();
          } catch (RuntimeException e) {
              logger.warn("Exception generating log4j configuration", e);
              throw e;
          }
      }
docs: @return log4j configuration in a properties file format
  
  @see PropertyPrinter