package org.postgresforest.vm;

import org.postgresforest.Driver;

public class Logger {
	private static LogUtil m_logUtil = null;

	public static void setLogUtil(LogUtil m_logUtil)
	{
		Logger.m_logUtil = m_logUtil;
	}

	private static void print(String prefix, String msg)
	{
		System.out.println(prefix + ": " + msg);
	}

	public static void trace(String msg)
	{
		print("TRACE", msg);
	}

	public static void info(String msg)
	{
		if ( Driver.logInfo )
			print("INFO", msg);
	}

	public static void debug(String msg)
	{
		if ( Driver.logDebug )
			print("DEBUG", msg);
	}
}
