For a newly installed JBoss WildFly 8 if your application is using log4j , there would not be any log in the file or console.
1. WHAT happened ?
There is no log printed in the console from deployed application in JBoss WildFly 8 which powered by log4j.
2. WHY it happened ?
Because JBoss WildFly 8 is using its own log configuration as below not your application ones.
3. HOW to resolve it
Step 1 : let JBoss WildFly 8 to load log4j.xml or log4j.properties from deployed application not standalone.xml by adding : <use-deployment-logging-config value="false"/> as below :
Step 2 : use the logging function from deployed application not JBoss WildFly 8 by adding WEB-INF/classes/jboss-deployment-structure.xml
You may refer to below for details on JBoss WildFly 8 logging configuration :
https://docs.jboss.org/author/display/WFLY8/Logging+Configuration#LoggingConfiguration-PerdeploymentLogging
Thanks for this. I was tearing my hair out because I desperately needed to see the log and no amount of messing with my wildfly config was helping. Well done!
ReplyDeleteThank you for the comment , glad it helps.
DeleteI'm new in wildfly... wich files are been modify in this example?
ReplyDelete1. ${JBOSS_HOME}\standalone\configuration\standalone.xml (if you are launching the server with standalone mode)
Delete2. ${project_location}\src\main\resources\jboss-deployment-structure.xml (if your project is maven powered)
Awersome !!
ReplyDeleteworked like a charm.
Kindly change your snippet as '/' is missing there (for above line only) and that might lead some naive user to some trouble.
Thanks :)