Frage

We are using log4j for application logging and maven for application packaging. As we have 3-4 application being deployed as a part of an EAR the size of the EAR is large. We were trying to go with the 'Skinny War's' approach but faced a problem with log4j. We used to log application logs in different file for each application but with Skinny WAR's as the classes of log4j are being loaded only once, only one log file is being created and log of each application is being appended to the same log file.

We thought of the famous solution of packaging log4j.jar in each WAR but then we'll have to move every jar file which needs the log4j in WAR ex. spring jar's this essentially will increase the EAR size.

Is there any alternate solution to this problem ? Any suggestion would be a great help.

Thanks.

War es hilfreich?

Lösung

Resolved the issue with RepositorySelectors. Check this

Andere Tipps

see if log4j 1.3 / log4j2 helps you fix the init - google ContextJNDISelector

http://logging.apache.org/log4j/2.x/manual/webapp.html

To compare

logback - JoranConfigurator it does exactly that, custom context based config

http://logback.qos.ch/manual/configuration.html

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top