Liferay DXP JSF portlet logging in custom file and location

Gunnar Brinkmann, modified 5 Years ago. Junior Member Posts: 54 Join Date: 12/2/11 Recent Posts
Hello,
The JSF portlet's class is the GenericFacesPortlet (which means not the MVCPortlet) and slf4j is used. I tried the resources/META-INF/portlet-log4j.xml (with dtd), but I cannot achieve logging in custom file and location.

Any hints would be appreciated, for example a running example using the GenericFacesPortlet, too. Liferay patch level is 7.1.10.fp14.

I'd like to log for for one category (custom AuditLog class in a component, using slf4j and used by multiple portlets) in for example liferay/logs/auditlog oder liferay/tomcat/logs/auditlog.
The portlets are registered and known in osgi (the component is just a jar dependency a.t.m.).

Regards,
gun

crossposting https://stackoverflow.com/questions/62870899/liferay-dxp-jsf-portlet-logging-in-custom-file-and-location
thumbnail
Neil Griffin, modified 5 Years ago. Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
Hi Gunnar,
Thanks for posting the question. I provided an answer at stackoverflow. Let's continue the discussion there.
Kind Regards,
Neil