diff --git a/manual/listeners.html b/manual/listeners.html index bbb03e05d..e201638a6 100644 --- a/manual/listeners.html +++ b/manual/listeners.html @@ -418,6 +418,41 @@ log4j.appender.LogFile.file=build.log
For more information about configuring Log4J see its documentation page.
+-lib
option).
+Translating the 1.x properties file into the 2.x xml syntax would result in
++++<?xml version="1.0" encoding="UTF-8"?> +<Configuration status="WARN"> + <Appenders> + <File name="file" fileName="build.log"> + <PatternLayout> + <Pattern>[%6r] %8c{1} : %m%n</Pattern> + </PatternLayout> + </File> + </Appenders> + <Loggers> + <Root level="ERROR"> + <AppenderRef ref="file" level="DEBUG"/> + </Root> + <Logger name="org.apache.tools.ant.Project" level="INFO"/> + <Logger name="org.apache.tools.ant.Project" level="INFO"/> + <Logger name="org.apache.tools.ant.taskdefs" level="INFO"/> + <Logger name="org.apache.tools.ant.taskdefs.Echo" level="WARN"/> + </Loggers> +</Configuration> +
messageLogged() method
;
+ A listener or logger should not write to standard output or error in the messageLogged()
method;
Ant captures these internally and it will trigger an infinite loop.
BuildListener.buildStarted(BuildEvent event)
is called,
- the project is not fully functional. The build has started, yes, and the event.getProject() method call
+ the project is not fully functional. The build has started, yes, and the event.getProject()
method call
returns the Project instance, but that project is initialized with JVM and ant properties, nor has it
parsed the build file yet. You cannot call Project.getProperty()
for property lookup, or
Project.getName()
to get the project name (it will return null).