Log4j - trouble writing to own log file?

If Glassfish uses log4j itself if will be up an runnning loaded by its classloader before you application starts, pointing to app servers log file, so your configuration file doesn't get loaded at all.

If Glassfish uses log4j itself if will be up an runnning loaded by its classloader before you application starts, pointing to app servers log file, so your configuration file doesn't get loaded at all. You could try to include log4j. Jar in your /WEB-INF/lib so that you get your own private copy loaded in your app's classloader, this should pick up your config, since in app server classloading local classloader takes precedence over parent (app server).

But it may depend on the classloading of the app server, I have worked on JBoss where additional steps were necessary like activating classloader isolation.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions