Re: JUnit tests do not produce logs if the JVM crashes
Thank you for the fast responses. I'll try them. Regards, Andras 2010/11/4 Patrick Hunt > In addition to what Mahadev suggested you can also change the > log4j.properties to log to a file rather than the CONSOLE. Although > that just redirects the logs, if there is some output to stdout/stderr > then junit buffering is still in play. > > Patrick > > On Thu, Nov 4, 2010 at 8:15 AM, Mahadev Konar > wrote: > > Hi Andras, > > Junit unit will always buffer the logs unless you print it out to > console. > > > > To do that, try running this > > > > ant test -Dtest.output=yes > > > > This will print out the logs to console as they are logged. > > > > Thanks > > mahadev > > > > > > On 11/4/10 3:33 AM, "András Kövi" wrote: > > > >> Hi all, I'm new to Zookeeper and ran into an issue while trying to run > the > >> tests with ant. > >> > >> It seems like the log output is buffered until the complete test suite > >> finishes and it is flushed into its specific file only after then. I had > to > >> make some changes to the code (no JNI or similar) that resulted in JVM > >> crashes. Since the logs are lost in this case, it is a little hard to > debug > >> the issue. > >> > >> Do you have any idea how I could disable the buffering? > >> > >> Thanks, > >> Andras > >> > > > > >
Re: JUnit tests do not produce logs if the JVM crashes
In addition to what Mahadev suggested you can also change the log4j.properties to log to a file rather than the CONSOLE. Although that just redirects the logs, if there is some output to stdout/stderr then junit buffering is still in play. Patrick On Thu, Nov 4, 2010 at 8:15 AM, Mahadev Konar wrote: > Hi Andras, > Junit unit will always buffer the logs unless you print it out to console. > > To do that, try running this > > ant test -Dtest.output=yes > > This will print out the logs to console as they are logged. > > Thanks > mahadev > > > On 11/4/10 3:33 AM, "András Kövi" wrote: > >> Hi all, I'm new to Zookeeper and ran into an issue while trying to run the >> tests with ant. >> >> It seems like the log output is buffered until the complete test suite >> finishes and it is flushed into its specific file only after then. I had to >> make some changes to the code (no JNI or similar) that resulted in JVM >> crashes. Since the logs are lost in this case, it is a little hard to debug >> the issue. >> >> Do you have any idea how I could disable the buffering? >> >> Thanks, >> Andras >> > >
Re: JUnit tests do not produce logs if the JVM crashes
Hi Andras, Junit unit will always buffer the logs unless you print it out to console. To do that, try running this ant test -Dtest.output=yes This will print out the logs to console as they are logged. Thanks mahadev On 11/4/10 3:33 AM, "András Kövi" wrote: > Hi all, I'm new to Zookeeper and ran into an issue while trying to run the > tests with ant. > > It seems like the log output is buffered until the complete test suite > finishes and it is flushed into its specific file only after then. I had to > make some changes to the code (no JNI or similar) that resulted in JVM > crashes. Since the logs are lost in this case, it is a little hard to debug > the issue. > > Do you have any idea how I could disable the buffering? > > Thanks, > Andras >