This fixed it, thanks! For those using XML to configure log4j, add the
following line to your console appender definition.

        <param name="Follow" value="true"/>

Jeff 
-----Original Message-----
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 06, 2008 6:58 PM
To: Ant Users List
Cc: Ravindran, Neal; Michael Dunn
Subject: RE: Loose logging when using forkmode


Neal

does your log4j.properties contain log4j.appender.STDOUT.follow=true
# need to set follow for stdout as it gets moved around in junit tests
log4j.appender.STDOUT.follow=true

as suggested by pete in Bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44530

With Warm Regards
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission. 


> Date: Mon, 6 Oct 2008 18:05:09 -0400
> From: [EMAIL PROTECTED]
> Subject: Loose logging when using forkmode
> To: user@ant.apache.org
> CC: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
> 
> Environment: ant 1.7.1, junit4.4 
> 
>  
> 
> We lost log4j logging output (eg. log.debug) in the <system-out>
section
> of the XML files when we switched to perBatch forkmode. [perBatch
> forkmode helps us greatly with performance of the tests.] Actually,
the
> FIRST test case that runs includes the log4j logging output but all
> others after that do not. Note that System.out.println's always appear
> in the xml files, just not log.debug.
> 
>  
> 
> Below is target from the build.xml file. If I remove the
> 'forkmode="perBatch"' the log4j logging output works fine. Any ideas
how
> to get logging with forkmode? Anyone using forkmode and getting the
> logging output (ie it's just me :-)) 
> 
>              
> 
>  
> 
> <target name="testI" depends="setUpInstrument,build" description=""
>
> 
>     <taskdef classpathref="cobertura.classpath"
> resource="tasks.properties"/>
> 
>     <junit printsummary="yes" haltonerror="false"
> failureproperty="junit_test_failed" forkmode="perBatch"
maxmemory="512m"
> >
> 
>                         
> 
>         <sysproperty key="net.sourceforge.cobertura.datafile"
> file="${base.dir}/cobertura.ser" />
> 
>         <classpath refid="cobertura.classpath" />
> 
>         <classpath>
> 
>             <pathelement path="${FmFileUrlMap.jar.file}" />
> 
>             <pathelement path="${GiJpaAbCd.jar.file}" />
> 
>             <pathelement location="${AllTests.path}"/>
> 
>             <pathelement path="${GiAdapterI.jar.file}" /> 
> 
>             <pathelement path="${local.classpath}" />
> 
>         </classpath>
> 
>         <formatter type="xml"/>
> 
>             <batchtest fork="yes" todir="${reports.dir}">
> 
>             <fileset dir="${AllTests.path}">
> 
>                 <include name="**/Test*.class"/>
> 
>                 <not> <filename name="**/*$*"/></not>
> 
>             </fileset>
> 
>             </batchtest>
> 
>       </junit>
> 
>       <fail if="junit_test_failed" message="One or more JUnit  tests
> failed"/>
> 
> </target>    
> 
>  
> 
>  
> 
> Jeff Boring
> 
> Orlando, Florida
> 

_________________________________________________________________
See how Windows connects the people, information, and fun that are part
of your life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to