1 28 29 30 package org.objectweb.jonas.common; 31 32 import java.util.Enumeration ; 33 import java.util.Properties ; 34 import org.objectweb.util.monolog.api.Logger; 35 36 39 public class PropDump { 40 41 public static void print(String header, Properties props, Logger logger, int logLevel) { 42 logger.log(logLevel, header); 43 logger.log(logLevel, "================================="); 44 String aName = null; 45 String aValue = null; 46 for(Enumeration pNames = props.propertyNames(); pNames.hasMoreElements() ; ) { 47 aName = (String )pNames.nextElement(); 48 aValue = (String )props.getProperty(aName); 49 if (aValue != null) 50 logger.log(logLevel, aName + " = " + aValue); 51 } 52 logger.log(logLevel, "================================="); 53 } 54 } 55 | Popular Tags |