Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Liferay DXP JSF portlet logging in custom file and location
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
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
Hi Gunnar,
Thanks for posting the question. I provided an answer at stackoverflow. Let's continue the discussion there.
Kind Regards,
Neil
Thanks for posting the question. I provided an answer at stackoverflow. Let's continue the discussion there.
Kind Regards,
Neil
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™