all, now i have trouble with shooting – why logs didn’t got printed out correctly problem.
There are 4 projects inside tomcat/webapps.
3 of them are using log4j library in the tomcat level lib directory and the other one is having its own log4j library inside its own project.
Each of them are reading their own log4j properties within their project.
I am the owner of the project which has its own log4j within the project classes folder.
and today a senior programmer accuse me because I dont use the tomcat level log4j library and the system get confused with which library should it be used, so the other three projects missing printing out the log.
Would this be true?
If yes, why? Cause my log4j read my own properties and it prints my project information correctly.
Thanks in advance to those who answer this question.
A default tomcat 7 installation does not provide a log4j library. Thus if your project needs this library it is a good idea (IMHO) to include this in your own webapp. If you depend on a specific tomcat server setup it will be hard to use the webapp in another container without changes.
By the way a statement form the tomcat documentation site regarding “using Log4j”:
I short words – I think you are doing it right and the others are doing it wrong (without knowing the details).