[bvalid-codewatch] SF.net SVN: bvalid: [19] trunk
Status: Beta
Brought to you by:
cwilper
|
From: <cw...@us...> - 2006-05-01 09:10:08
|
Revision: 19 Author: cwilper Date: 2006-05-01 02:09:54 -0700 (Mon, 01 May 2006) ViewCVS: http://svn.sourceforge.net/bvalid/?rev=19&view=rev Log Message: ----------- logging config via log4j.configuration instead of in-jar log4j.xml, also reduced default log level Modified Paths: -------------- trunk/build.xml trunk/src/bin/bvalid trunk/src/bin/bvalid.bat trunk/src/config/log4j.xml trunk/src/java/net/sf/bvalid/BValid.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2006-05-01 06:57:49 UTC (rev 18) +++ trunk/build.xml 2006-05-01 09:09:54 UTC (rev 19) @@ -28,9 +28,6 @@ includes="**" classpathref="compile.path" optimize="${optimize}" debug="${debug}"/> - <copy todir="build/classes"> - <fileset dir="src/config"/> - </copy> <copy file="src/java/net/sf/bvalid/BValid.properties" tofile="build/classes/net/sf/bvalid/BValid.properties"/> <propertyfile file="build/version.properties"> <entry key="buildDate" type="date" value="now"/> @@ -59,6 +56,7 @@ </copy> <copy todir="dist"> <fileset dir="src/bin"/> + <fileset dir="src/config"/> </copy> <chmod dir="dist" perm="ugo+x" includes="bvalid"/> <jar jarfile="dist/bvalid.jar" basedir="build/classes"/> Modified: trunk/src/bin/bvalid =================================================================== --- trunk/src/bin/bvalid 2006-05-01 06:57:49 UTC (rev 18) +++ trunk/src/bin/bvalid 2006-05-01 09:09:54 UTC (rev 19) @@ -15,6 +15,7 @@ -Djava.endorsed.dirs="$BVALID_HOME/lib" \ -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl \ -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl \ + -Dlog4j.configuration="file://$BVALID_HOME/log4j.xml" \ net.sf.bvalid.BValid $1 $2 $3 $4 $5 $6 $7 $8 $9) exit $? Modified: trunk/src/bin/bvalid.bat =================================================================== --- trunk/src/bin/bvalid.bat 2006-05-01 06:57:49 UTC (rev 18) +++ trunk/src/bin/bvalid.bat 2006-05-01 09:09:54 UTC (rev 19) @@ -3,7 +3,7 @@ goto checkEnv :envOk -java -Xms64m -Xmx96m -cp "%BVALID_HOME%\bvalid.jar" -Djava.endorsed.dirs="%BVALID_HOME%\lib" -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl net.sf.bvalid.BValid %1 %2 %3 %4 %5 %6 %7 %8 %9 +java -Xms64m -Xmx96m -cp "%BVALID_HOME%\bvalid.jar" -Djava.endorsed.dirs="%BVALID_HOME%\lib" -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Dlog4j.configuration="file:/%BVALID_HOME%\log4j.xml" net.sf.bvalid.BValid %1 %2 %3 %4 %5 %6 %7 %8 %9 if errorlevel 1 goto endWithError goto end Modified: trunk/src/config/log4j.xml =================================================================== --- trunk/src/config/log4j.xml 2006-05-01 06:57:49 UTC (rev 18) +++ trunk/src/config/log4j.xml 2006-05-01 09:09:54 UTC (rev 19) @@ -15,7 +15,7 @@ </layout> </appender> - <category name="net.sf.bvalid"> + <category name="net.sf.bvalid.BValid"> <priority value="INFO" /> </category> Modified: trunk/src/java/net/sf/bvalid/BValid.java =================================================================== --- trunk/src/java/net/sf/bvalid/BValid.java 2006-05-01 06:57:49 UTC (rev 18) +++ trunk/src/java/net/sf/bvalid/BValid.java 2006-05-01 09:09:54 UTC (rev 19) @@ -140,7 +140,11 @@ _LOG.info("Validation of " + xmlFile.getPath() + " succeeded in " + ms + "ms."); } catch (ValidationException e) { long ms = System.currentTimeMillis() - st; - _LOG.error("Validation of " + xmlFile.getPath() + " failed in " + ms + "ms.\n" + e.getMessage()); + if (e.getCause() != null) { + _LOG.error("Validation of " + xmlFile.getPath() + " failed in " + ms + "ms.", e.getCause()); + } else { + _LOG.error("Validation of " + xmlFile.getPath() + " failed in " + ms + "ms.\n" + e.getMessage()); + } } } long total = System.currentTimeMillis() - startTime; @@ -222,7 +226,6 @@ throw new ArgException("unrecognized argument: " + args[i]); } } else { - System.out.println("Naked arg: " + args[i]); if (_lang == null) { try { _lang = SchemaLanguage.forName(args[i]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |