ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Mark <robertmarkbram.li...@gmail.com>
Subject Controlling log4j output from ant
Date Wed, 10 Apr 2013 08:01:43 GMT
Hi All,

I am having trouble controlling the output from ant to log4j. This is my
log4j2.xml:

<?xml version="1.0" encoding="UTF-8"?>
<configuration status="debug">
   <appenders>
      <Console name="CONSOLE" target="SYSTEM_OUT">
         <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
      </Console>
      <File name="LOGFILE" fileName="log/helloWorld.log">
         <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
      </File>
      <Asynch name="ASYNC">
         <appender-ref ref="LOGFILE"/>
         <appender-ref ref="CONSOLE"/>
      </Asynch>
   </appenders>
   <loggers>
      <root level="info">
         <appender-ref ref="ASYNC"/>
      </root>
   </loggers>
</configuration>

And this is my build.xml:

<project default="helloWorld">
    <target name="helloWorld">
        <echo message="Hello World"/>
    </target>
</project>

The build.xml outputs one line, the logger is set to INFO.. but I see 87
lines of output in my log (only 14 lines of which appear to be INFO)!

http://pastebin.com/6LMxLTge

What have I missed that lets all those DEBUGs come through?

I also posted this yesterday on
http://stackoverflow.com/questions/15901173/controlling-log4j-output-from-ant
.

Thanks for any assistance!

Rob
:)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message