0

I have deployed one war file in JBOSS eap7.4, but all my logs are going to server.log file by default. I have 2 jars in my war file for which I need to log messages in separate files. Please help me.

This is the custom handler I have created in standalone.xml

And this is the module.xml

This is my log4j.xml file to implement logs for 2 jars with their package names

2 Answers2

0

You need to exclude the org.apache.logging.api from your deployment in a jboss-deployment-structure.xml file. Then include both the log4j-api and log4j-core libraries in your deployment if you want to use a log4j2 configuration file. See the JBoss EAP 7.4 documentation for more details.

James R. Perkins
  • 16,800
  • 44
  • 60
  • Try After that In your war ,add this line in manifest file Manifest-Version: 1.0 Logging-Profile: accounts-app-profile – Arjun Ganta Dec 08 '21 at 17:39
0

You need to achieve this using logging profiles. Please refer https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/6.4/html/administration_and_configuration_guide/sect-logging_profiles

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 08 '21 at 19:04