/*
 * Copyright (C) 2005 NTT DATA Corporation
 * 
 */
package org.postgresforest.vm;


import org.postgresforest.Driver;


public class LogUtil {

	protected String m_ID = "";
	
	private static int id = 0;

	/**
	 * 
	 */
	public LogUtil() {

		synchronized (this) {
			m_ID = "ID[" + Integer.toString(LogUtil.id++) + "]:";
		}

	}

		
	
	public void debug(String msg)
	{
		if (Driver.logDebug)
		{
			
			Driver.debug(m_ID + msg);
		}
	}
	public void debug(String msg, Exception ex)
	{
		if (Driver.logDebug)
		{
			Driver.debug(m_ID + msg,  ex);
		}
	}
	public void info(String msg)
	{
		if (Driver.logInfo)
		{
			Driver.info(m_ID +msg);
		}
	}
	public void info(String msg, Exception ex)
	{
		if (Driver.logInfo)
		{
			Driver.info(m_ID + msg,  ex);
		}
	}



}
