NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Re: log4j.properties where does it go?

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
Clio 5000
Posted via mailing list.





PostPosted: Wed Nov 10, 2010 6:19 pm    Post subject: Re: log4j.properties where does it go? Reply with quote

Hello,

I had some problems using log4j, because it seems to be imposible to
use log4j.properties, but putting the log4j.properties in
WEB-INF/classes it worked fine.

I think you must put log4j.properties in somewhere your classpath
looks for. Or in the root of your project.

Good luck!

On Sun, Nov 15, 2009 at 5:23 AM, Steve289 <address-removed> wrote:
Quote:
I have a simple command line java app that uses log4j logging. I created a log4j.properties file but it doesn't seem to be found because I am seeing "log4j:WARN No appenders could be found for logger" when I run it.
Back to top
mdeggers



Joined: 28 Jan 2009
Posts: 208

PostPosted: Thu Nov 11, 2010 3:25 am    Post subject: Re: log4j.properties where does it go? Reply with quote

Clio 5000 wrote:
Hello,

I had some problems using log4j, because it seems to be imposible to
use log4j.properties, but putting the log4j.properties in
WEB-INF/classes it worked fine.

I think you must put log4j.properties in somewhere your classpath
looks for. Or in the root of your project.

Good luck!



I normally put my log4j.properties file in the default package when creating a J2EE application. When NetBeans packages the application, this will put the log4j.properties file in WEB-INF/classes.

In a standalone project, this will put log4j.properties at the same level as META-INF. If it's not found, then you might try placing the log4j.properties in the top level package of your project.

. . . . just my two cents

/mde/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
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 cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo