cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Log 4j

Former Member
0 Kudos

Hi All,

I had checked with the sample Log 4j application avialble in the SDN . But it was integrated with the SAP logging framework.

We wanted to use only log 4j without integrating with the SAP logging f.w. . Wanted to know that is this possible with WAS . If yes how do we do that ?

regards

rajesh kr

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Rajesh,

You can implement it in the same way as with any other J2EE app server, include the Log4j jar in your classpath and either deploy in /libs in your .war/.ear or deploy to the J2EE Engine filesystem to somewhere like :

\usr\sap\xxx\JCxx\j2ee\cluster\server0\bin\ext

I dont know if the SAP remote logviewer can be configured to open files generated by log4j by default, but I would guess you could configure log4j to output in a standard format that was compatible.

Cheers,

Steve

Message was edited by: Steve Archer

Former Member
0 Kudos

Hi Steve

We are putting the log4j.jar in web-inf/lib ,but the log is written in the defaulttrc.log . Is it possible to configure log4j in such a way that we can see this in a Independent log (not in the server0/log folder).

regards

rajesh kr

Former Member
0 Kudos

Hi Steve

How can we deploy in the

\usr\sap\xxx\JCxx\j2ee\cluster\server0\bin\ext because all the apps(Ears) etc get deployed in the

\usr\sap\xxx\JCxx\j2ee\cluster\server0\apps\sap.com folder .

Any idea how do we register a 3rd party jar in SAP Web AS

like log4j .

Regards

rajesh kr

Former Member
0 Kudos

Rajesh,

We had the exact same issue. The answer depends on whether you're using Tracks and Development Components (DC) or not.

If you're using Tracks then one way you can do it is to create a DC of type "External Library", expose the log4j packages as Public Part and then create a Used DC in the DC where you want to use log4j.

Having done J2EE programming in a non-SAP environment for several years this seems a little convoluted but it works.

Please let me know if you need more details and I'll be glad to provide more.

Former Member
0 Kudos

Hi David,

Can you explain me this in more detail?

regards,

Anand

Former Member
0 Kudos

Anand, I'll be glad to provide more details but can you please tell me if you are trying to do this using a local project, local DC or an NWDI DC.

David.