NetBeans Forums

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

Need help with log4j.properties placement for post-build application

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
KarlNickels



Joined: 13 May 2011
Posts: 1
Location: Charlotte, NC

PostPosted: Fri May 13, 2011 3:51 pm    Post subject: Need help with log4j.properties placement for post-build application Reply with quote

After a couple days of searching via google, I've resorted to posting to see if someone has figured this out before.

I have an app that uses log4j (our shop uses log4j exclusively). Previously I embedded the log4j.properties file in the default package and everything worked fine once the applicaton jar was built.

Now I want to remove the log4j.properties file from the jar so that it can be adjusted by tech support as necessary (that is the purpose after all). I've done the research to modify build.xml to copy it to the build classes directory so that it works when running in the IDE, but I still can't determine the proper placement for the application jar.

I've tried copying to the dist directory with the jar. I've tried adding it to the manifest classpath via the project.properties file. It turns up in the manifest as lib/log4j.properties, but placing the file there via the ant build doesn't work either.

I'm at my wits end with this. Any help with this issue would be greatly appreciated.
Back to top
rishabhsrao



Joined: 31 Jan 2010
Posts: 17
Location: Bangalore, India

PostPosted: Sun May 15, 2011 3:43 am    Post subject: Reply with quote

Please have a look at http://logging.apache.org/log4j/1.2/manual.html and scroll down to the Example Configurations section. Here, they explain about loading the properties file from an external location.

Hope this helps a little.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans 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 can 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