User: pathoss
Date: 02/05/12 14:36:19
Modified: core/src/xdoclet Tag: MODULE_REFACTORING_BRANCH
DocletTask.java
Log:
Use logging instead of System.out.
Revision Changes Path
No revision
No revision
1.39.2.9 +14 -17 xdoclet/core/src/xdoclet/DocletTask.java
Index: DocletTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/DocletTask.java,v
retrieving revision 1.39.2.8
retrieving revision 1.39.2.9
diff -u -w -r1.39.2.8 -r1.39.2.9
--- DocletTask.java 12 May 2002 12:06:23 -0000 1.39.2.8
+++ DocletTask.java 12 May 2002 21:36:19 -0000 1.39.2.9
@@ -11,6 +11,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import org.apache.commons.logging.Log;
import org.apache.tools.ant.AntClassLoader;
@@ -37,19 +38,15 @@
import xdoclet.util.XmlValidator;
/**
- * A base class for all Tasks. It can also be used directly, useful for the case
- * where you want to execute a template file but you don't want to bother
- * writing a new task.
+ * A base class for all Tasks. It can also be used directly, useful for the case
where you want to execute a template file but you don't want to bother writing
+ * a new task.
*
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Aslak Helles�y</a>
* @created June 19, 2001
- * @version $Revision: 1.39.2.8 $
- * @todo we're defined via a taskdef that specidfies a classpath(ref) we
- * need to get the classloader and find out what classes are on our
- * classpath. this is needed for module inspection!! This can be done by
- * getting ((AntClassLoader)getClass().getClassLoader()).getClasspath().
- * (Aslak)
+ * @version $Revision: 1.39.2.9 $
+ * @todo we're defined via a taskdef that specidfies a classpath(ref) we need
to get the classloader and find out what classes are on our classpath. this
+ * is needed for module inspection!! This can be done by getting
((AntClassLoader)getClass().getClassLoader()).getClasspath(). (Aslak)
*/
public class DocletTask extends XJavadocTask implements DynamicConfigurator
{
@@ -82,13 +79,14 @@
private final static void registerModules(List modules) throws BuildException
{
+ Log log = LogUtil.getLog(DocletTask.class, "registerModules");
+
Iterator i = modules.iterator();
- System.out.println("Registering modules...");
while (i.hasNext()) {
XDocletModule module = (XDocletModule) i.next();
- System.out.println("Registering module " + module);
+ log.info("Registering module " + module);
// Register tag handlers defined in the module
List tagHandlerDefinitions = module.getTagHandlerDefinitions();
@@ -97,12 +95,12 @@
while (k.hasNext()) {
TagHandlerDefinition thd = (TagHandlerDefinition) k.next();
- System.out.println("Registering tag handler " + thd.namespace);
+ log.debug("Registering tag handler " + thd.namespace);
try {
TemplateTagHandler handler = (TemplateTagHandler)
Class.forName(thd.className).newInstance();
- System.out.println("Add tagHandler " + thd.namespace + "(" +
thd.className + ")");
+ log.debug("Add tagHandler " + thd.namespace + " (" +
thd.className + ')');
TemplateEngine.getEngineInstance().setTagHandlerFor(thd.namespace, handler);
}
catch (TemplateException e) {
@@ -120,7 +118,7 @@
while (j.hasNext()) {
SubTaskDefinition std = (SubTaskDefinition) j.next();
- System.out.println("Add SubTask " + std.name + "(" +
std.implementationClass + ")");
+ log.debug("Add SubTask " + std.name + " (" +
std.implementationClass + ')');
subtaskMap.put(std.name, std);
}
}
@@ -456,8 +454,7 @@
}
/**
- * Returns the singleton context object and creates it if not already
- * created and registers it as the single instance.
+ * Returns the singleton context object and creates it if not already created
and registers it as the single instance.
*
* @return the singleton context object
*/
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel