Code example for ConsoleHandler

Methods: setLevel

0
	/** Logger system */ 
	private Logger log = null;
 
	public ImportYATEA() { 
		// Log system 
		ConsoleHandler consoleHandler = new ConsoleHandler();
		consoleHandler.setLevel(ImportYATEA.logLevel);
		log = Logger.getLogger(ImportYATEA.class.getName());
		log.setUseParentHandlers(false); // Do not use default handlers
		log.addHandler(consoleHandler);
		log.setLevel(ImportYATEA.logLevel);
	} 
 
	/** 
	 * TEST Function used only for test purposes. Initialize a connection to the 
	 * database. 
	 */ 
	static void initDafoeDataSource() { 
		IDataSource con = new DataSource(
				"jdbc:postgresql://localhost:5432/DAFOE2", "postgres", 
				"postgres");