Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to use log4j with tuple pre processor
Bill Klish
OpenDeploy 6.0.2 SP1
I can't seem to figure out what I need to do to get my log4j messages appearing. I used to know but have since forgotten and can't find any old code.
I have my tuple pre-processor called successfully, as it is changing the data. Hoewver, none of my messages are showing up in my log files. I have put my pre-processor in a jar file in the od-home/userlib directory, in which a log4j.xml file exists in the root of the file Also, I put the log4j.jar file in the od-home/userlib directory. This didn't work.
I then copied it into the od-home/lib directory and did a restart of the server and that didn't work either.
I do not see anything meaningful in the log for the deployment of od-home/od.log.
What am I doing wrong?
Find more posts tagged with
Comments
Bill Klish
I figured it out, wish my memory was better.
Unless you include an XML parsing jar file as well, java will not be able to read, parse and initialize the log4j.xml configuration file. To fix, all you have to do is make it a log4j.properties file or include an xml jar library as well.
So, add log4j.jar to the userlib directory, and make sure your custom.jar file has the log4j.properties file in it. That should be all you need.