[Idrs-commit] CVS: Idrs/dev/net/sourceforge/idrs/core IDRSServlet.java,1.2,1.3 IDRSParams.java,1.1,1
Brought to you by:
bigman921
|
From: Marc B. <big...@us...> - 2004-08-30 00:57:02
|
Update of /cvsroot/idrs/Idrs/dev/net/sourceforge/idrs/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12162/net/sourceforge/idrs/core Modified Files: IDRSServlet.java IDRSParams.java Log Message: Added log4j support. cleaned up the logs Index: IDRSServlet.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/net/sourceforge/idrs/core/IDRSServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IDRSServlet.java 5 Dec 2000 16:33:39 -0000 1.2 --- IDRSServlet.java 30 Aug 2004 00:56:07 -0000 1.3 *************** *** 8,11 **** --- 8,13 ---- import javax.servlet.http.*; import javax.servlet.*; + + import org.apache.log4j.Logger; //import IDRSSecurity; //import IDRSReport; *************** *** 40,43 **** --- 42,46 ---- private IDRSPool idrss; protected Application app; + static Logger logger = Logger.getLogger(IDRSServlet.class.getName()); /** Creates new IDRSServlet */ public IDRSServlet() { *************** *** 87,92 **** catch (Exception e) { try { ! System.out.println(e); ! e.printStackTrace(); } catch (Exception e2) {} --- 90,94 ---- catch (Exception e) { try { ! logger.error("Could retrieve pool",e); } catch (Exception e2) {} *************** *** 177,181 **** } catch (Exception poole) { ! try {poole.printStackTrace(System.out);}catch (Exception ee){} } --- 179,183 ---- } catch (Exception poole) { ! logger.error("Could not load pool",poole); } *************** *** 191,196 **** } catch (Exception e) { ! System.out.println(e + "\n" + e.getMessage() + "\n" ); ! e.printStackTrace(); } } --- 193,197 ---- } catch (Exception e) { ! logger.error("Could not generate report"); } } *************** *** 201,206 **** } catch (Exception e) { ! System.out.println(e + "\n" + e.getMessage() + "\n" ); ! e.printStackTrace(); } } --- 202,206 ---- } catch (Exception e) { ! logger.error("Could not process report",e); } } *************** *** 227,231 **** if (tmpCon == null) { //there are no more connections to use and waiting has timed out ! System.out.println("No Conns!"); connsGotten = conns.keys(); while (connsGotten.hasMoreElements()) { --- 227,231 ---- if (tmpCon == null) { //there are no more connections to use and waiting has timed out ! logger.warn("No connections available"); connsGotten = conns.keys(); while (connsGotten.hasMoreElements()) { Index: IDRSParams.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/net/sourceforge/idrs/core/IDRSParams.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IDRSParams.java 1 Dec 2000 20:04:44 -0000 1.1 --- IDRSParams.java 30 Aug 2004 00:56:07 -0000 1.2 *************** *** 8,11 **** --- 8,13 ---- import javax.servlet.http.*; import javax.servlet.*; + + import org.apache.log4j.Logger; //import IDRSSecurity; import java.io.*; *************** *** 20,24 **** * @version */ ! public class IDRSParams extends HttpServlet { private String dbName, dbDriver, --- 22,27 ---- * @version */ ! public class IDRSParams extends HttpServlet { ! Logger logger = Logger.getLogger(IDRSParams.class.getName()); private String dbName, dbDriver, *************** *** 65,73 **** } catch (Exception e) { ! try { ! //System.out.println(e); ! e.printStackTrace(); ! } ! catch (Exception e2) {} } IDRSPath = svg.getInitParameter("whereIsIDRS"); --- 68,74 ---- } catch (Exception e) { ! ! logger.error("Could not create connection pool",e); ! } IDRSPath = svg.getInitParameter("whereIsIDRS"); |