cancel
Showing results for 
Search instead for 
Did you mean: 

Log4j logging in SAP

former_member182652
Participant
0 Kudos

Hi Experts,

I have a requirement of using log4j logging with WebDynpro Java application. For this, I created an external library DC which contains the log4j Jar file. Then,I created a J2EE library DC which uses the external library DC as used DC to deploy it on the server.

After that, I created a java DC which contains the log4j.properties file and a java class containing method to read the properties file and create the log. I created a J2ee library DC which includes the java DC as used DC to deploy it on the server.

Then, I created a webDynpro DC where I've added both the library DCs as used DCs and also gave a library reference for both the library DCs.

Now,the problem i'm facing is that if i run the java class locally,the log file gets created on my machine but when i deploy the WebDynpro application calling the same method on the server, it does not create any log. Please provide pointers regarding what could be the reason for the issue and how to resolve this.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kunal,

the preferable solution is to bridge to SAP Location logging. This article describes how to do it:

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20ecb0f4-ccb0-2a10-46aa-ceee8895f34b

Jan