NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
KarlNickels
Joined: 13 May 2011 Posts: 1 Location: Charlotte, NC
|
Posted: Fri May 13, 2011 3:51 pm Post subject: Need help with log4j.properties placement for post-build application |
|
|
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
|
Posted: Sun May 15, 2011 3:43 am Post subject: |
|
|
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 |
|
 |
|
|
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
|
|