org.apache.tools.ant.listener
Class CommonsLoggingListener
java.lang.Object
org.apache.tools.ant.listener.CommonsLoggingListener
- BuildListener, EventListener, BuildListener, BuildLogger
public class CommonsLoggingListener
extends java.lang.Object
Jakarta Commons Logging listener.
Note: do not use the SimpleLog as your logger implementation as it
causes an infinite loop since it writes to System.err, which Ant traps
and reroutes to the logger/listener layer.
The following names are used for the log:
org.apache.tools.ant.Project.PROJECT_NAME - for project events
org.apache.tools.ant.Target.TARGET_NAME - for target events
TASK_CLASS_NAME.TARGET_NAME - for events in individual targets.
In all target and project names we replace "." and " " with "-".
TODO: we should use the advanced context logging features (and expose them
in c-l first :-)
TODO: this is _very_ inefficient. Switching the out and tracking the logs
can be optimized a lot - but may require few more changes to the core.
CommonsLoggingListener
public CommonsLoggingListener()
Construct the listener and make sure that a LogFactory
can be obtained.
Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.