Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting up Log4J in Orion webapps

 
Phil Johnston
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So - I've put the log4j.jar in my orion/lib directory, and (as per everything I've read) I've put the log4j.xml config file in the web-inf/classes directory in my war file.

but it doesn't pick it up. with debugging switched on, it wants to look only in the same directory as the log4j.jar file, which isn't what I want it to do.

if I have to, I'll put the jar file into the war (or ear) file, and put the xml file in the same directory as that, but I'd rather not have to do that. any ideas?
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've put the log4j.jar in my orion/lib directory, and ... I've put the log4j.xml config file in the web-inf/classes directory in my war file.

if I have to, I'll put the jar file into the war (or ear) file, and put the xml file in the same directory as that, but I'd rather not have to do that. any ideas?


I think that if you put the log4j.xml file into the war, you also need to put the log4j.jar into the war. As far as I know, that is the way it is typically done. Putting the xml file into the lib directory won't work.
 
Phil Johnston
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marilyn - though I'm having great difficulty in even doing that.

I've got my ear file set up as so:

myear
/META-INF
/META-INF/MANIFEST.MF
/myejbs.jar
/log4j-1.2.9.jar
/thirdparty1.jar
/mywar.war

now - by my reckoning, this should be fine, no?

but I'm not getting my jar files picked up by myejbs.jar classes.

have I missed something out?

do I have to put an entry in my MANIFEST.MF to point to the jar files?

Thanks in advance for any help,

Phil
 
Jag Bains
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I have my log4j.jar and my log4j.properties in my Orion/lib dir.

That seems to work fine for me
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic