billbarker 2003/02/23 14:25:53 Modified: jasper2/src/share/org/apache/jasper JspC.java Log: Remove the logStream, and use c-l exclusively for logging. It is confusing to have multiple loggings, and the old-style wasn't getting initialized for the 'ant' task. Also added the 'listErrors' property to the 'ant' task (useful for debugging). Revision Changes Path 1.31 +9 -18 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java Index: JspC.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- JspC.java 21 Feb 2003 18:23:14 -0000 1.30 +++ JspC.java 23 Feb 2003 22:25:53 -0000 1.31 @@ -191,8 +191,6 @@ CharArrayWriter servletout; CharArrayWriter mappingout; - static PrintStream logStream; - JspCServletContext context; /* * Maintain a dummy JspRuntimeContext for compiling tag files @@ -351,6 +349,10 @@ org.apache.jasper.xmlparser.ParserUtils.validating=b; } + public void setListErrors( boolean b ) { + listErrors = b; + } + public void setOutputDir( String s ) { if( s!= null ) { scratchDir=new File(new File(s).getAbsolutePath()); @@ -580,7 +582,7 @@ // Generate mapping generateWebMapping( file, clctxt ); if ( showSuccess ) { - logStream.println( "Built File: " + file ); + log.info( "Built File: " + file ); } return true; } catch (FileNotFoundException fne) { @@ -594,9 +596,7 @@ file), e); if ( listErrors ) { - logStream.println( "Error in File: " + file ); - logStream.println(e.getMessage()); - e.printStackTrace(logStream); + log.warn( "Error in File: " + file, e ); return true; } else if (dieLevel != NO_DIE_LEVEL) { dieOnExit = true; @@ -831,7 +831,6 @@ System.out.println(Localizer.getMessage("jspc.usage")); } else { try { - logStream = System.out; JspC jspc = new JspC(); jspc.setArgs(arg); jspc.execute(); @@ -943,14 +942,6 @@ if( file==null ) break; pages.addElement( file ); } - } - - /** - * allows user to set where the log goes other than System.out - * @param log - */ - public static void setLog( PrintStream log ) { - JspC.logStream = log; } /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]