Show TOC

/IWBEP/CL_COS_LOGGERLocate this document in the navigation structure

Use

This API can be used to log failure information to the corresponding tools in SAP. These are the application log and the Computing Center Management System (CCMS).

Instantiation

               DATA lo_logger TYPE REF TO /iwbep/cl_cos_logger. 

  " get logger object from context (/IWBEP/IF_MGW_CONTEXT) attribute of class /IWBEP/CL_MGW_ABS_DATA
  lo_logger = me->mo_context->get_logger( ).
            
Methods

Method GET_LOGGER

This method returns the logger instance.

Method LOG_BAPI_RETURN

This method logs information provided in form of a BAPIRET_2 structure.

Parameter

Description

IS_OBJECT_KEY

ID of the object causing the error

IT_BAPI_MESSAGES

BAPIRET_2 messages

IV_AGENT

Component which raises the message

IV_IS_EXTERNAL

External message get logged as text messages

Method LOG_FREE_TEXT_MESSAGE

Parameter

Description

IV_MSG_TEXT

Text of the message

IS_MSG

Type and context of the message text

RV_MSG_HANDLE

Message handle

Method LOG_MESSAGE

Parameter

Description

IV_MSG_TYPE

Message type

IV_MSG_ID

Message class

IV_MSG_NUMBER

Message number

IV_MSG_TEXT

Text of the message

IV_MSG_V1

Message variable

IV_MSG_V2

Message variable

IV_MSG_V3

Message variable

IV_MSG_V4

Message variable

IV_SYSTEM_ALIAS

System alias

IS_OBJECT_KEY

ID of the object causing the errors

IV_AGENT

Component

IV_PROBLEM_CLASS

Message problem class of application log

IV_MSG_HANDLE

Handle of previous message

IV_LOG_TO_CCMS

If set message will be forwarded to CCMS

IV_LOG_MSG_TEXT

If set the text of the message will be logged

RV_MSG_HANDLE

Message handle

Method LOG_MONITORING_INFORMATION

This method adds a message to CCMS.

Parameter

Description

IV_MSG_TYPE

Message type

IV_MSG_ID

Message class

IV_MSG_NUMBER

Message number

IV_MSG_V1

Message variable

IV_MSG_V2

Message variable

IV_MSG_V3

Message variable

IV_MSG_V4

Message variable

IV_SYSTEM_ALIAS

System alias

IS_OBJECT_KEY

ID of the object causing the error

IV_AGENT

Component

Method LOG_SECURITY_MESSAGE

This message logs a security message (using a security agent/component).

Parameter

Description

IV_MSG_TEXT

Text of the message

IV_EXT_KEY

External key of security message

IV_MSG_HANDLE

Handle of previous message

RV_MSG_HANDLE

Message handle

Method LOG_STEP_COMPLETION

This method logs the successful completion of a processing step.

Parameter

Description

IV_MSG_TYPE

Message type

IV_MSG_ID

Message class

IV_MSG_NUMBER

Message number

IV_MSG_V1

Message variable

IV_MSG_V2

Message variable

IV_MSG_V3

Message variable

IV_MSG_V4

Message variable

IV_SYSTEM_ALIAS

System alias

IS_OBJECT_KEY

ID of the object causing the error

IV_AGENT

Component

IV_PROBLEM_CLASS

Message problem class of application log

IV_MSG_HANDLE

Handle of previous message

IV_LOG_TO_CCMS

If set the message will be forwarded to CCMS

Method LOG_STEP_COMPLETION_EXCEPTION

This method logs the unsuccessful completion of a processing step.

Parameter

Description

IO_EXCEPTION_EXTERN

Exception to be logged

IV_MSG_ID

Message class

IV_MSG_NUMBER

Message number

IV_MSG_V1

Message variable

IV_MSG_V2

Message variable

IV_MSG_V3

Message variable

IV_MSG_V4

Message variable

IV_SYSTEM_ALIAS

System alias

IS_OBJECT_KEY

ID of the object causing the error

IV_AGENT

Component

IV_MSG_HANDLE

Handle of previous message

IV_LOG_TO_CCMS

If set the message will be forwarded to CCMS

Method LOG_STEP_INIT

This method creates the initial log message. Call this method first in your processing step.

Parameter

Description

IV_MSG_ID

Message class

IV_MSG_NUMBER

Message number

IV_MSG_V1

Message variable

IV_MSG_V2

Message variable

IV_MSG_V3

Message variable

IV_MSG_V4

Message variable

IV_SYSTEM_ALIAS

System alias

IS_OBJECT_KEY

ID of the object causing the error

IV_AGENT

Component

RV_MSG_HANDLE

Message handle

Method CLOSE_LOGGER

This method saves the application log and closes the logger object.

Example

Class /IWBEP/CL_MGW_RT_ERROR_MSG demonstrates how to use the logger in the following methods:

  • TEST_LOGGER

  • TEST_LOGGER_PROCESSING

  • TEST_LOGGER_PROCESSING_EXC

More Information

For more information on supportability, the CCMS and the application log see the SAP NetWeaver Gateway Foundation Technical Operations Guide.