Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log4j in Websphere

I recently take over a web application project using websphere and log4j running under AIX. To create a development environment, I setup all the components in windows, using eclipse to compile a WAR file and deploy it.

All is working fine except that log file is not created. I changed the log file in log4j.properties from something like in below and and give everyone full access permission to the directory:

log4j.appender.F1.File=/abc/def/logs/admin.log

to

log4j.appender.F1.File=c:/logs/admin.log

What else can I check?

I create a simple standalone testapp which use the same log4j.properties and it can create the log file, but when the servlet deployed to websphere, it doesn't work. Please help! Thanks!

like image 806
John Avatar asked Oct 02 '11 15:10

John


1 Answers

Ok, I think this article should help you. It seems that WebSphere CE uses log4j by default and controls it with a global properties file. There is a section on how to use application-specific properties files.

like image 176
dbreaux Avatar answered Sep 24 '22 22:09

dbreaux