cancel
Showing results for 
Search instead for 
Did you mean: 

Using SAP Logging API

former_member214651
Active Contributor
0 Kudos

Hi,

I am developing a composite application on CE7.1 environment using CAF, NWDS CE7.1 SP03. I have also used an API which writes the Logs and Traces on the server into a file.

But now the requirement is that the Logs and trace files needs to be viewed from "Log Configuration" section in NWA>Problem Management>logs and traces.

A folder (name of the project) needs to be created under the LogConfiguration>Root Category>Applications. All the Logs and Trace files needs to be written separately into this folder.

I need to know how this can be acheived using the SAP logging API. Code sample would be of great help to me.

Regards,

Poojith MV

Accepted Solutions (0)

Answers (1)

Answers (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Poojith MV

Refer to the code snippet located in the page: [Relations Between Category and Location|http://help.sap.com/saphelp_nw70/helpdata/en/35/f4953fc405330ee10000000a114084/content.htm].

Note: Methods setEffectiveSeverity and addLog do a Log configuration. You can configure the same in Log Configuration.

BR, Siarhei

former_member214651
Active Contributor
0 Kudos

Hi,

I tried following the steps mentioned in the reply. I an able to see the log and trace statements on the server. But in the Log Configuration page of NWA, the category which i created points to a file "applications_00.log" and the trace file points to "defaultTrace_00.trc"

Is it possible to make my application point to a separate log and trace file like <projectname>.log and <projectname>.trc file?

Regards,

Poojith MV

Former Member
0 Kudos

Hello there,

You can define a specific location for your log file. Please refer to this.

http://help.sap.com/saphelp_nw70/helpdata/en/35/f4953fc405330ee10000000a114084/frameset.htm

HTH

-Vivek