[Idrs-commit] CVS: Idrs/dev/src/net/sourceforge/idrs/deploy DocReset.java,1.5,1.6 HotDeploy.java,1.6
Brought to you by:
bigman921
|
From: Marc B. <big...@us...> - 2004-08-30 00:57:01
|
Update of /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12162/src/net/sourceforge/idrs/deploy Modified Files: DocReset.java HotDeploy.java RMLDeploy.java Log Message: Added log4j support. cleaned up the logs Index: DocReset.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/DocReset.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DocReset.java 29 Aug 2004 05:01:42 -0000 1.5 --- DocReset.java 30 Aug 2004 00:56:07 -0000 1.6 *************** *** 20,23 **** --- 20,26 ---- import java.util.*; import java.sql.*; + + import org.apache.log4j.Logger; + import net.sourceforge.idrs.pool.*; *************** *** 26,29 **** --- 29,33 ---- */ public final class DocReset extends Thread { + static Logger logger = Logger.getLogger(DocReset.class.getName()); String allowedHost; int port; *************** *** 63,67 **** .equals(allowedHost))) { ! System.out.println("Validation Succeeded"); in = new BufferedReader( --- 67,71 ---- .equals(allowedHost))) { ! logger.info("Validation Succeeded"); in = new BufferedReader( *************** *** 69,76 **** input = in.readLine(); in.close(); ! System.out.println( ! "id : " + input.substring(0, input.indexOf(":"))); ! System.out.println( ! "name : " + input.substring(input.indexOf(":") + 1)); redeploy( input.substring(0, input.indexOf(":")), --- 73,77 ---- input = in.readLine(); in.close(); ! redeploy( input.substring(0, input.indexOf(":")), *************** *** 78,89 **** } ! System.out.println("closing connection"); client.close(); } } catch (Exception e) { ! try { ! e.printStackTrace(System.out); ! } catch (Exception ee) { ! } } } --- 79,87 ---- } ! client.close(); } } catch (Exception e) { ! logger.error("Could not reset document",e); } } Index: HotDeploy.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/HotDeploy.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** HotDeploy.java 29 Aug 2004 05:01:42 -0000 1.6 --- HotDeploy.java 30 Aug 2004 00:56:07 -0000 1.7 *************** *** 16,19 **** --- 16,22 ---- import javax.servlet.http.*; import javax.servlet.*; + + import org.apache.log4j.Logger; + import java.io.*; import java.util.*; *************** *** 26,29 **** --- 29,33 ---- */ public final class HotDeploy extends HttpServlet { + static Logger logger = Logger.getLogger(HotDeploy.class.getName()); String user, pass, url, className,parseClass,schemaLocation,rmlTrans; String[] servers; *************** *** 79,90 **** out = new PrintStream(new FileOutputStream(new File(logPath))); String now = formatter.format(new java.util.Date(System.currentTimeMillis())); ! out.println("[Log Begining " + now + "]"); } catch (Exception e) { ! try { ! System.out.println("Logging could not occurr, " + logPath + " not found"); ! } ! catch (Exception ee) { ! } } --- 83,92 ---- out = new PrintStream(new FileOutputStream(new File(logPath))); String now = formatter.format(new java.util.Date(System.currentTimeMillis())); ! logger.info("[Log Begining " + now + "]"); } catch (Exception e) { ! ! logger.error("Logging could not occurr, " + logPath + " not found",e); ! } *************** *** 122,128 **** dep = new RMLDeploy(con); ! if (dep == null) System.out.println("dep null"); ! if (req.getParameter("update") == null) System.out.println("Update null"); dep.setUpdate(req.getParameter("update").equals("1")); --- 124,130 ---- dep = new RMLDeploy(con); ! if (dep == null) logger.warn("dep null"); ! if (req.getParameter("update") == null) logger.warn("Update null"); dep.setUpdate(req.getParameter("update").equals("1")); *************** *** 186,194 **** } catch (Exception e) { ! try { ! e.printStackTrace(System.out); ! } ! catch (Exception ee) { ! } } } --- 188,192 ---- } catch (Exception e) { ! logger.error("Could not deploy",e); } } Index: RMLDeploy.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/RMLDeploy.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RMLDeploy.java 29 Aug 2004 05:01:42 -0000 1.7 --- RMLDeploy.java 30 Aug 2004 00:56:07 -0000 1.8 *************** *** 192,196 **** this.compiler = new RmlCompiler( ! logger, src, parseClass, --- 192,196 ---- this.compiler = new RmlCompiler( ! src, parseClass, *************** *** 297,301 **** for (i = 0, m = names.length; i < m; i++) { snames += (String) names[i] + "=? ,"; ! System.out.println(names[i]); } --- 297,301 ---- for (i = 0, m = names.length; i < m; i++) { snames += (String) names[i] + "=? ,"; ! } *************** *** 332,336 **** snames += (String) names[i] + " ,"; svals += "? , "; ! System.out.println(names[i]); } --- 332,336 ---- snames += (String) names[i] + " ,"; svals += "? , "; ! } |