Forums de discussion

Custom Log files for Portlets

Selva kumar, modifié il y a 7 années.

Custom Log files for Portlets

Junior Member Publications: 39 Date d'inscription: 23/07/15 Publications récentes
I have developed 3 portlets and packed each portlets in seperate WAR file. I have included the log4j.dtd and log4j.xml so that the seperate log files will be generated for each portlets. It is easy for me for analyse the issues using the log files if anything went wrong in any of the portlets.

But I got a requirement now to package all the portlets in single WAR. I don't know how to manage above situation now. I need define seperate log files for each portelts in the WAR. is it possible? if so how would be the configuration?
thumbnail
Denis Signoretto, modifié il y a 7 années.

RE: Custom Log files for Portlets

Expert Publications: 375 Date d'inscription: 21/04/09 Publications récentes
Hi selva,

This article can help you

https://web.liferay.com/it/web/brett.swaim/blog/-/blogs/using-log4j-to-ensure-each-portlet-has-it-s-own-log-file

Just define multiple appender an related categories.
HTH

Denis
thumbnail
David H Nebinger, modifié il y a 7 années.

RE: Custom Log files for Portlets

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
Just my opinion, but I think you're over thinking things. In production, whether one war or many wars, you're not going to have a lot of debug logging going on. You're only going to turn that on for whatever code is giving you problems lest you negatively impact production performance.

When you look at it from this point of view, I think it should be apparent that burning cycles to set up and maintain separate logs will only take cycles away from real development activities.