payara / Payara

Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.
http://www.payara.fish
Other
880 stars 301 forks source link

Bug Report: Log4j2 doesn't work with Payara-5.2022.4 and Payara-6.2022.1/FISH-6843 #6089

Open lexpersona-dev opened 1 year ago

lexpersona-dev commented 1 year ago

Brief Summary

Hello, In the payara-5.2022.3 version in payara5.2022.3\glassfish\domains\domain1\config\domain.xml I was using the variable: <jvm-options>-Dlog4j.configurationFile=file:///${com.sun.aas.instanceRoot}/config/log4j2.xml</jvm-options> in the section : <config name="server-config"> then the log4j2.xml file in the following directory: payara-5.2022.3\glassfish\domains\domain1\config and it works But when I wanted to reproduce this procedure for version 5.2022.4 and 6.2022.1 of Payara without success Thanks for your help.

Expected Outcome

I expected MyApp.log in payara5.2022.4\glassfish\domains\domain1\logs

Current Outcome

Nothing is created

Reproducer

To reproduce the problem add the three log4j libs (present in the zip)

in payara5.2022.4\glassfish\lib add variable <jvm-options>-Dlog4j.configurationFile=file:///${com.sun.aas.instanceRoot}/config/log4j2.xml</jvm-options> in the section: <config name="server-config"> from payara5.2022.4\glassfish\domains\domain1\config\domain.xml add log4j2.xml file (present in the zip) in folder payara5.2022.4\glassfish\domains\domain1\config start the domain and check that the MyApp.log file in the folder payara5.2022.4\glassfish\domains\domain1\logs is not created

payara5.2022.3.zip

Operating System

Windows 11 Business 21H2 and Windows 11 Business 22H2

JDK Version

17.0.3 and 11.0.16.1

Payara Distribution

Payara Server Full Profile

shub8968 commented 1 year ago

Hi @lexpersona-dev,

I have raised an Internal JIRA with FISH-6843 for it. Thanks.