NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
hanasaki jiji Posted via mailing list.
|
Posted: Wed Jun 11, 2008 9:22 pm Post subject: maven project with log4j - junit tests - output goes to blac |
|
|
Using a maven based project and JUnit tests run from Maven (netbeans 6.1)
the .warn(...) and other output doesn't show up anywhere.
Actually the log4j system says it cannot find log4j.xml - I think
/////
log4j:WARN No appenders could be found for logger (example.SimpleJunitTest).
log4j:WARN Please initialize the log4j system properly.
///////////
Where in the maven project directory structure does log4j.xml go?
What, if anything, needs to be put in the POM for the log4j.xml file to be used? |
|
| Back to top |
|
 |
hanasaki jiji Posted via mailing list.
|
Posted: Sun Jun 22, 2008 6:35 am Post subject: maven project with log4j - junit tests - output goes to blac |
|
|
Just got the same results / failure with the nightly build of 20080622
On Thu, Jun 19, 2008 at 6:33 AM,
<carl.martin@eurobase-international.com> wrote:
| Quote: |
hanasakijiji wrote:
| Quote: |
Using a maven based project and JUnit tests run from Maven (netbeans 6.1)
the .warn(...) and other output doesn't show up anywhere.
Actually the log4j system says it cannot find log4j.xml - I think
/////
log4j:WARN No appenders could be found for logger
(example.SimpleJunitTest).
log4j:WARN Please initialize the log4j system properly.
///////////
Where in the maven project directory structure does log4j.xml go?
What, if anything, needs to be put in the POM for the log4j.xml file to be
used?
| Quoted from:
http://www.nabble.com/maven-project-with-log4j---junit-tests---output-goes-to-blackhole-tp17787562p17787562.html
I'm having the same problem, I've tried place an log4j.properties in pretty much every directory but it seems to make no difference.
If you configure log4j programmatically in the test its works but (and there a big but!) as you add more tests you end up with repeated log line!!! There must be a better ans??
Cheers
Carl
|
|
|
| Back to top |
|
 |
Alex Sherwin Posted via mailing list.
|
Posted: Sun Jun 22, 2008 2:06 pm Post subject: maven project with log4j - junit tests - output goes to blac |
|
|
I've never used this specifically with maven, but I use junit with my ant
builds... Im not on my work machine, but I believe you need to just need to
put log4j.xml in the basedir of your ant project for it to be found
Alex Sherwin
alex.sherwin@acadiasoft.com
-----Original Message-----
From: hanasaki jiji [mailto:hanasaki@gmail.com]
Sent: Sunday, June 22, 2008 2:36 AM
To: carl.martin@eurobase-international.com; nbusers@netbeans.org
Subject: [nbusers] Re: maven project with log4j - junit tests - output goes
to blackhole
Just got the same results / failure with the nightly build of 20080622
On Thu, Jun 19, 2008 at 6:33 AM,
<carl.martin@eurobase-international.com> wrote:
| Quote: |
hanasakijiji wrote:
| Quote: |
Using a maven based project and JUnit tests run from Maven (netbeans 6.1)
the .warn(...) and other output doesn't show up anywhere.
Actually the log4j system says it cannot find log4j.xml - I think
/////
log4j:WARN No appenders could be found for logger
(example.SimpleJunitTest).
log4j:WARN Please initialize the log4j system properly.
///////////
Where in the maven project directory structure does log4j.xml go?
What, if anything, needs to be put in the POM for the log4j.xml file to
|
| be
http://www.nabble.com/maven-project-with-log4j---junit-tests---output-goes-t
o-blackhole-tp17787562p17787562.html
| Quote: |
I'm having the same problem, I've tried place an log4j.properties in
| pretty much every directory but it seems to make no difference.
| Quote: |
If you configure log4j programmatically in the test its works but (and
| there a big but!) as you add more tests you end up with repeated log line!!!
There must be a better ans??
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|