0
votes

Hi I am deploying my spring application to Openshift Jboss AS. The problem is whereever i placed the log4j.properties it is not read by the application. I've tried the following ways to achieve this but can't.

  1. Placed my log4j.properties in WEB-INF/classes.
  2. Placed my log4j.properties in WEB-ING/resources and in web.xml loaded the context-param for log4jConfigLocation.
  3. Created a jboss-deployment-structure.xml in META-INF which excludes log4j logging.

Nothing seems to work . Can some one please help me.

1

1 Answers

0
votes

In Jboss there is a default logging available, which can be implemented by modifying standaole.xml. In Openshift when you ssh into your app using the below command

rhc ssh <app-name>

You will taken into your application where when you give ls command you will see the list of files and folders, you can find jbossas folder change your working directory to that folder

cd jbossas

execute ls command you will see list of folders where you will find standalone folder, change your working directory to this folder

cd standalone

again execute ls command you can see configuration folder, change your working directory to this

cd configuration

now if you execute ls command you can see standalone.xml, we need to edit this file, but editing here may not work because this standalone.xml is a copy of the another file which is in the following folder .openshift/config/standalone.xml . You can find this folder where you clone your git copy, Not in eclipse go to your working directory in window.

We need to edit this file and add our logging properties here. thats how it works