/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package utils;

import com.evolute.utils.error.ErrorLogger;
import com.evolute.utils.error.LoggerProperties;
import com.evolute.utils.error.ProjectsEnum;
import com.evolute.utils.error.log4j.DBLogger;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author dneves
 */
public class PlanosActuacaoLogger
{

	private static String EVO_LOGGER_DB = "jdbc:postgresql://www.evolute.pt:5436/evo_logging?logUnclosedConnections=true&loginTimeout=5&socketTimeout=5&tcpKeepAlive=true";
	private static String EVO_LOGGER_USER = "evo_logger";
	private static String EVO_LOGGER_PASSWD = "Typein1";

	public static void init()
	{
		Map< LoggerProperties, String > map = new HashMap< LoggerProperties, String >();
		map.put( LoggerProperties.USERNAME, EVO_LOGGER_USER );
		map.put( LoggerProperties.PASSWORD, EVO_LOGGER_PASSWD );
		map.put( LoggerProperties.URL, EVO_LOGGER_DB );
		map.put( LoggerProperties.PROJECT, ProjectsEnum.PLANOS_ACTUACAO.toString() );
		map.put( LoggerProperties.SOFTWARE_VERSION, "1" );
		map.put( LoggerProperties.SOFTWARE_NAME, "SIPRP - Planos Actuacao" );
		// TODO - firewall - must be implemented over http (ws)
		ErrorLogger.initializeLogger( new DBLogger( map ) );
	}

}
