Migrating WAR from Websphere to EAP 6.1.0 GA
gamvi01 Jan 13, 2014 4:21 PMHi All
I am migrating my war from websphere 7 to jboss 6 EAP. I want to use my own log4j.properties located at WebsiteServicesGateway.war\WEB-INF\classes\META-INF\logging\log4j.properties. Attached the log4j.properties for your reference.
My deployment structure is at WebsiteServicesGateway.war\WEB-INF\ with contents.
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
<exclusions>
<module name="org.apache.log4j" />
<module name="org.jboss.log4j.logmanager"/>
</exclusions>
</deployment>
</jboss-deployment-structure>
I start the server with org.jboss.as.logging.per-deployment=false all will be logged under [stdout]. Log file wssg.log is getting created but no logs to that file . all the logs are going to server.log ( MY -D properties , -Dapp.log.console.threshold=INFO -Dorg.jboss.as.logging.per-deployment=false -Dapp.log.root=C:\Temp") I tried -Dlog4j.configuration pointing to log4j.properties.
Our app is using spring with jersey , so we have the below configuration.
-
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:META-INF/logging/log4j.properties</param-value>
</context-param>
In server.log i see app is reading the log4j.properties file , and it creats those files but nothing gets printed.
Initializing log4j from [classpath:META-INF/logging/log4j.properties]
12:10:09,977 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/WebsiteServicesGateway]] (ServerService Thread Pool -- 59) Initializing Spring root WebApplicationContext
-
log4j.properties.zip 3.0 KB
-
Capture.PNG 48.4 KB