/*
 * Created on Jul 27, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package jreport.uds.javabean;

import java.util.Enumeration;
import java.util.Properties;

import jet.bean.JREngine;
import jet.log.JRLogger;

/**
 * @author jennyw
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class UDSForJavaBeanLogger {
	public static String UDSFORJAVABEAN_LOG_PREFIX = "[UDS-JavaBean]";
	private static JRLogger logger = (JRLogger)JRLogger.getLogger(JREngine.class.getName());
	
	public static void debug(String message){
		logger.debug(UDSFORJAVABEAN_LOG_PREFIX+message);
//		System.out.println(UDSFORJAVABEAN_LOG_PREFIX+message);
	}
	
	public static void debug( Properties props){
		Enumeration keys=  props.keys();
        while(keys.hasMoreElements()){
        	String key =(String)keys.nextElement();
        	logger.debug(UDSFORJAVABEAN_LOG_PREFIX+"Name:["+key+"]"+" Value:["+props.getProperty(key)+"]");
        }
	}
	
	public static void debug( Exception e){
		logger.debug(e);
	}
	
}
