You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by ep...@apache.org on 2004/10/29 14:36:18 UTC
cvs commit: jakarta-turbine-fulcrum/parser/xdocs changes.xml
epugh 2004/10/29 05:36:18
Modified: parser/src/java/org/apache/fulcrum/parser
DefaultParameterParser.java DataStreamParser.java
parser/xdocs changes.xml
Log:
Replace Log4j Category with Logger
Revision Changes Path
1.2 +6 -6 jakarta-turbine-fulcrum/parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java
Index: DefaultParameterParser.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultParameterParser.java 13 Feb 2004 14:24:54 -0000 1.1
+++ DefaultParameterParser.java 29 Oct 2004 12:36:18 -0000 1.2
@@ -66,7 +66,7 @@
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
import org.apache.commons.fileupload.FileItem;
-import org.apache.log4j.Category;
+import org.apache.log4j.Logger;
/**
* DefaultParameterParser is a utility object to handle parsing and
@@ -108,9 +108,9 @@
private byte[] uploadData = null;
/**
- * Log4j category
+ * Log4j logger
*/
- Category category = Category.getInstance(getClass().getName());
+ Logger LOG = Logger.getLogger(getClass().getName());
/**
* Create a new empty instance of ParameterParser. Uses the
@@ -206,7 +206,7 @@
}
catch (UnsupportedEncodingException e)
{
- category.error(getCharacterEncoding() +
+ LOG.error(getCharacterEncoding() +
"encoding is not supported. Used the default "
+ "when reading form data.");
value = item.getString();
@@ -221,7 +221,7 @@
}
catch(Exception e)
{
- category.error(new Exception("File upload failed", e));
+ LOG.error(new Exception("File upload failed", e));
}
}
1.2 +6 -6 jakarta-turbine-fulcrum/parser/src/java/org/apache/fulcrum/parser/DataStreamParser.java
Index: DataStreamParser.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/parser/src/java/org/apache/fulcrum/parser/DataStreamParser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DataStreamParser.java 13 Feb 2004 14:24:54 -0000 1.1
+++ DataStreamParser.java 29 Oct 2004 12:36:18 -0000 1.2
@@ -63,7 +63,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
-import org.apache.log4j.Category;
+import org.apache.log4j.Logger;
/**
* DataStreamParser is used to parse a stream with a fixed format and
@@ -123,7 +123,7 @@
/**
* Log4j category
*/
- Category category = Category.getInstance(getClass().getName());
+ Logger LOG = Logger.getLogger(getClass().getName());
/**
* Create a new DataStreamParser instance. Requires a Reader to read the
@@ -252,7 +252,7 @@
String colval = tokenizer.sval;
if (DEBUG)
{
- category.debug("DataStreamParser.nextRow(): " +
+ LOG.debug("DataStreamParser.nextRow(): " +
colname + '=' + colval);
}
lineValues.add(colname, colval);
@@ -278,7 +278,7 @@
}
catch (IOException e)
{
- category.error("IOException in CSVParser.hasNext", e);
+ LOG.error("IOException in CSVParser.hasNext", e);
}
return hasNext;
@@ -302,7 +302,7 @@
}
catch (IOException e)
{
- category.error("IOException in CSVParser.next", e);
+ LOG.error("IOException in CSVParser.next", e);
throw new NoSuchElementException();
}
1.3 +3 -0 jakarta-turbine-fulcrum/parser/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/parser/xdocs/changes.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- changes.xml 22 Oct 2004 09:11:22 -0000 1.2
+++ changes.xml 29 Oct 2004 12:36:18 -0000 1.3
@@ -8,6 +8,9 @@
<body>
<release version="1.0.2-dev" date="in CVS">
<action dev="epugh" type="add">
+ Removed use of old Log4j Category in favor of Logger.
+ </action>
+ <action dev="epugh" type="add">
Make gump friendly.
</action>
<action dev="epugh" type="add">
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
RE: cvs commit: jakarta-turbine-fulcrum/parser/xdocs changes.xml
Posted by Eric Pugh <ep...@upstate.com>.
Good point.. I have implemented it.. Any other feedback much appreciated
as I want to do a VOTE for fulcrum soon...
> -----Original Message-----
> From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
> Sent: Saturday, October 30, 2004 11:32 AM
> To: turbine-dev@jakarta.apache.org
> Subject: Re: cvs commit: jakarta-turbine-fulcrum/parser/xdocs
> changes.xml
>
>
> epugh@apache.org writes:
>
> >epugh 2004/10/29 05:36:18
>
> > Modified: parser/src/java/org/apache/fulcrum/parser
> > DefaultParameterParser.java DataStreamParser.java
> > parser/xdocs changes.xml
> > Log:
> > Replace Log4j Category with Logger
>
> Any reason for not using commons-logging here?
>
> Regards
> Henning
>
> --
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
> hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
>
> RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
> Linux, Java, perl, Solaris -- Consulting, Training, Development
>
> "Fighting for one's political stand is an honorable action, but re-
> fusing to acknowledge that there might be weaknesses in one's
> position - in order to identify them so that they can be remedied -
> is a large enough problem with the Open Source movement that it
> deserves to be on this list of the top five problems."
> -- Michelle Levesque, "Fundamental Issues with
> Open Source Software Development"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-turbine-fulcrum/parser/xdocs changes.xml
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
epugh@apache.org writes:
>epugh 2004/10/29 05:36:18
> Modified: parser/src/java/org/apache/fulcrum/parser
> DefaultParameterParser.java DataStreamParser.java
> parser/xdocs changes.xml
> Log:
> Replace Log4j Category with Logger
Any reason for not using commons-logging here?
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
Linux, Java, perl, Solaris -- Consulting, Training, Development
"Fighting for one's political stand is an honorable action, but re-
fusing to acknowledge that there might be weaknesses in one's
position - in order to identify them so that they can be remedied -
is a large enough problem with the Open Source movement that it
deserves to be on this list of the top five problems."
-- Michelle Levesque, "Fundamental Issues with
Open Source Software Development"
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org