package uk.ac.ebi.quickgo.indexer;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * Process to index all the information in Solr
 *
 * @author cbonill
 *
 */
public class QuickGOIndexerProcess {


		static ApplicationContext appContext;
		static QuickGOIndexer quickGOIndexer;

		/**
		 * We can use this method for indexing the data in Solr for the moment
		 *
		 * @param args
		 */
		public static void main(String[] args) {

			appContext = new ClassPathXmlApplicationContext("common-beans.xml",	"indexing-beans.xml", "query-beans.xml");
			quickGOIndexer = (QuickGOIndexer) appContext.getBean("quickGOIndexer");
			String start = DateFormat.getInstance().format(Calendar.getInstance().getTime());
			System.out.println("================================================================");
			System.out.println("STARTED: " + start);
			System.out.println("================================================================");
			quickGOIndexer.index();
			System.out.println("================================================================");
			System.out.println("DONE: " + DateFormat.getInstance().format(Calendar.getInstance().getTime()));
			System.out.println("================================================================");
		}
}

@@ -117,24 +117,81 @@
 .Calendar;%0A%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A
 import org.s
@@ -384,19 +384,16 @@
 cbonill%0A
- *%0A
  */%0Apubl
@@ -427,17 +427,16 @@
 ess %7B%0A%0A%0A
-%09
 %09static 
@@ -466,17 +466,16 @@
 ontext;%0A
-%09
 %09static 
@@ -511,14 +511,97 @@
 ;%0A%0A%09
+final static Logger logger = LoggerFactory.getLogger(QuickGOIndexerProcess.class);%0A%0A
 %09/**%0A
-%09
 %09 * 
@@ -672,14 +672,12 @@
 ent%0A
-%09
 %09 *%0A
-%09
 %09 * 
@@ -692,15 +692,13 @@
 rgs%0A
-%09
 %09 */%0A
-%09
 %09pub
@@ -738,17 +738,16 @@
 s) %7B%0A%0A%09%09
-%09
 appConte
@@ -805,17 +805,17 @@
 ns.xml%22,
-%09
+ 
 %22indexin
@@ -846,25 +846,24 @@
 ns.xml%22);%0A%09%09
-%09
 quickGOIndex
@@ -922,17 +922,16 @@
 exer%22);%0A
-%09
 %09%09String
@@ -1008,35 +1008,27 @@
 e());%0A%09%09
-%09System.out.println
+logger.info
 (%22======
@@ -1091,35 +1091,27 @@
 ==%22);%0A%09%09
-%09System.out.println
+logger.info
 (%22STARTE
@@ -1127,35 +1127,27 @@
 art);%0A%09%09
-%09System.out.println
+logger.info
 (%22======
@@ -1210,17 +1210,16 @@
 ==%22);%0A%09%09
-%09
 quickGOI
@@ -1236,35 +1236,27 @@
 ex();%0A%09%09
-%09System.out.println
+logger.info
 (%22======
@@ -1319,35 +1319,27 @@
 ==%22);%0A%09%09
-%09System.out.println
+logger.info
 (%22DONE: 
@@ -1416,27 +1416,19 @@
 ;%0A%09%09
-%09System.out.println
+logger.info
 (%22==
@@ -1493,14 +1493,13 @@
 ====%22);%0A
-%09
 %09%7D%0A%7D%0A

Move from using Log4j to Simple Logging Facade For Java (SLF4J)