cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Logging Questions

Former Member
0 Kudos

Hi,

We have a J2EE application that talks to SAP thru JCO. The J2EE app & SAP may sit on two different machines. The J2EE application is using log4j for logging. We want to redirect the log4j output to SAP logs. I found an article about how to integrate log4j logging with SAP (http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20ecb0f4-ccb0-2a10-46aa-ceee8895f34b).

Questions:

1. Does the log4j integration described in the article work with JCO?

2. Anything else we need to do to redirect the log from our J2EE application (on machine 1) to the SAP system (on machine 2)?

Thanks

susi

Edited by: Susi Soedarsono on Feb 18, 2010 8:30 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

jpenninkhof
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Susi,

The logging bridge as described in the article you linked to doesn't send logging information to the ABAP system. Instead it will just capture the log entries from log4j and add them to the SAP log on the SAP JEE server. You will be able to view your log entries using the netweaver administrator (http://server:port/nwa).

If you really want your log entries to appear in e.g. the SAP application log, you need a different implementation that would call (custom) BAPIs at the ABAP side (based on the FMs in functiongroup SBAL). This would mean that you have to alter the code as listed on page 10. Instead of loc.logT, you will have to fire a BAPI-call to send your log-entry to the ABAP stack.

I wouldn't really recommend this method though, because you probably want to log fault-situations. If it is the Jco connection that is at fault, you won't have any log at all, as you won't be able to call your BAPIs anymore.

You can't live with your logs living in the Java server?

Cheers,

Jan