Entering content frame

Procedure documentation APIs for the Log Locate the document in its SAP Library structure

Switching the Log on and off: CALO_DB_LOG_ON_OFF

This function module is used to switch the log process on and off. The default setting for module CALO_INIT_API switches the log on (see Initializing APIs).

Note

If the log object or sub-object cannot be found, it must be created with transaction SLG0.

Object:

CAPI

Sub-object:

CAPI_LOG

 

INPUT:

FLAG_DB_LOG_ON

Default: X

(Database log on)

Write Log Entry to Database: CALO_MSG_APPEND_DB_LOG

You can use this function module to write the messages collected in local memory to the database log.

The internal memory is then initialized.

Example

Your program calls a large number of APIs, and you do not want all calls to write a log entry to the database. You want the APIs to write the messages to local memory only, and you want to write the collected messages to the database yourself at points in time that you decide.

This is what you do:

          1. Call function module CALO_INIT_API with Collect messages switched on.
          2. Call the APIs you require. All of these APIs write their messages to local memory only.
          3. Call function module CALO_MSG_APPEND_DB_LOG when you want to write a log entry (with all messages) to the database and initialize local memory.

Read Messages in Current Log: CALO_LOG_READ_MESSAGES

You can use this function module to read the contents of the local log memory.

This does not delete the local memory until you do one of the following:

INPUT:

Class of message

Default: 4

 

Allowed values:

 
 

1: Read top priority logs only

 
 

2: Read medium priority logs also

 
 

3: Read low priority logs also

 
 

4: Read all logs

 
 

Language

 

Initialize Log Interface: CALO_LOG_INIT_MEMORY

This function module deletes the local log memory.

The Log

You can use transaction SLG1 to find data for object CAPI, sub-object CAPI_LOG. A log entry contains all messages of a "Write log" call.

 

 

 

Leaving content frame