GitHub
LibrariesOpen source libraries used to build this documentation site.
LibraryRoleVersionLicense
AstroastroSite framework6.3.1MIT
Astro React@astrojs/reactReact integration5.0.4MIT
Astro Sitemap@astrojs/sitemapSitemap generation3.7.2MIT
UI5 Web Components@ui5/webcomponentsUI primitives2.22.0Apache-2.0
UI5 Web Components Fiori@ui5/webcomponents-fioriFiori shell components2.22.0Apache-2.0
UI5 Web Components Icons@ui5/webcomponents-iconsIcon set2.22.0Apache-2.0
UI5 Web Components React@ui5/webcomponents-reactReact wrappers2.22.0Apache-2.0
ReactreactUI runtime19.2.6MIT
React DOMreact-domDOM renderer19.2.6MIT
ShikishikiSyntax highlighting4.0.2MIT
Docs/ORK/CORE/ORK/IF_LOGGER
Interface/ORK/IF_LOGGER
Logger
InterfaceLogger
Package
/ORK/CORE
Members
30
Description

Logger instances are immutable. Methods such as WITH_CONTEXT, WITH and CHILD return new logger instances and do not modify the original instance.

17 items
Methods
log
Method
Creates a log entry.

Parameters

NameDescriptionmessageMessage texttypeLog levelparamsStructured parametersmessage_objectMessage object referencesy_messageSAP system message referencecargoArbitrary payloadresultCreated log entry including timestamp

Signature

METHODS log IMPORTING !message TYPE string
                        !type TYPE csequence DEFAULT /ork/if_logger=>cm_type-i
                        params TYPE ty_tts_map OPTIONAL
                        message_object TYPE REF TO if_message OPTIONAL
                        sy_message TYPE REF TO symsg OPTIONAL
                        cargo TYPE REF TO data OPTIONAL
              RETURNING VALUE(result) TYPE ty_s_log_entry.
info
Method
Creates an informational log entry.

Parameters

NameDescriptionmessageMessage textparamsStructured parameterssy_messageSAP system message referencecargoArbitrary payloadresultCreated log entry including timestamp

Signature

METHODS info IMPORTING !message TYPE string
                         params TYPE ty_tts_map OPTIONAL
                         sy_message TYPE REF TO symsg OPTIONAL
                         cargo TYPE REF TO data OPTIONAL
               RETURNING VALUE(result) TYPE ty_s_log_entry.
success
Method
Creates a success log entry.

Parameters

NameDescriptionmessageMessage textparamsStructured parameterssy_messageSAP system message referencecargoArbitrary payloadresultCreated log entry including timestamp

Signature

METHODS success IMPORTING !message TYPE string
                            params TYPE ty_tts_map OPTIONAL
                            sy_message TYPE REF TO symsg OPTIONAL
                            cargo TYPE REF TO data OPTIONAL
                  RETURNING VALUE(result) TYPE ty_s_log_entry.
warning
Method
Creates a warning log entry.

Parameters

NameDescriptionmessageMessage textparamsStructured parameterssy_messageSAP system message referencecargoArbitrary payloadresultCreated log entry including timestamp

Signature

METHODS warning IMPORTING !message TYPE string
                            params TYPE ty_tts_map OPTIONAL
                            sy_message TYPE REF TO symsg OPTIONAL
                            cargo TYPE REF TO data OPTIONAL
                  RETURNING VALUE(result) TYPE ty_s_log_entry.
error
Method
Creates an error log entry.

Parameters

NameDescriptionmessageMessage textparamsStructured parameterssy_messageSAP system message referencecargoArbitrary payloadresultCreated log entry including timestamp

Signature

METHODS error IMPORTING !message TYPE string
                          params TYPE ty_tts_map OPTIONAL
                          sy_message TYPE REF TO symsg OPTIONAL
                          cargo TYPE REF TO data OPTIONAL
                RETURNING VALUE(result) TYPE ty_s_log_entry.
exception
Method
Creates a log entry from an exception.

Parameters

NameDescriptionexceptionException instancetypeLog levelparamsStructured parameterssy_messageSAP system message referencecargoArbitrary payloadresultCreated log entry including timestamp

Signature

METHODS exception IMPORTING !exception TYPE REF TO cx_root
                              !type TYPE csequence DEFAULT /ork/if_logger=>cm_type-e
                              params TYPE ty_tts_map OPTIONAL
                              sy_message TYPE REF TO symsg OPTIONAL
                              cargo TYPE REF TO data OPTIONAL
                    RETURNING VALUE(result) TYPE ty_s_log_entry.
log_last_symessage
Method
Logs the last SAP system message.

Uses current SY-MSG* values.

Parameters

NameDescriptionparamsStructured parametersmessage_objectMessage object referencecargoArbitrary payloadresultCreated log entry including timestamp

Signature

METHODS log_last_symessage IMPORTING params TYPE ty_tts_map OPTIONAL
                                       message_object TYPE REF TO if_message OPTIONAL
                                       cargo TYPE REF TO data OPTIONAL
                             RETURNING VALUE(result) TYPE ty_s_log_entry.
to_file_string
Method
Serializes entries to a file string.

Parameters

NameDescriptionresultSerialized representation of all log entries

Signature

METHODS to_file_string RETURNING VALUE(result) TYPE string.
to_json
Method
Serializes entries to JSON.

Parameters

NameDescriptionresultRoot JSON node

Signature

METHODS to_json RETURNING VALUE(result) TYPE REF TO /ork/if_json_node.
get_entries
Method
Returns all stored log entries.

Parameters

NameDescriptionresultTable of log entries

Signature

METHODS get_entries RETURNING VALUE(result) TYPE ty_tt_entries.
get_scope
Method
Returns the current logger scope.

Scope represents the hierarchical path of this logger instance. It is an ordered list of scope segments (e.g. class → method → operation) created via successive calls to CHILD.

For child loggers, the returned scope includes all inherited parent scope segments in the order they were added.

Parameters

NameDescriptionresultOrdered scope path of this logger

Signature

METHODS get_scope RETURNING VALUE(result) TYPE ty_tt_scope.
get_context
Method
Returns the current logger context.

The returned context represents all key/value entries that are automatically attached to each log entry created by this logger.

Context is flat and unordered metadata (e.g. request id, tenant, user, correlation id).

For child loggers, the returned context includes inherited parent context entries.

Scope information is not part of the context and is handled separately.

Parameters

NameDescriptionresultEffective context of this logger

Signature

METHODS get_context RETURNING VALUE(result) TYPE ty_tt_context.
with_context
Method
Creates a new logger with additional context.

Returns a new logger instance containing the existing context plus the supplied context entries.

Context is merged by key. If a key already exists, its value is overwritten by the supplied context.

The original logger instance remains unchanged. Scope hierarchy is not affected.

Parameters

NameDescriptioncontextAdditional context entriesresultNew logger instance including merged context

Signature

METHODS with_context IMPORTING !context TYPE ty_tt_context
                       RETURNING VALUE(result) TYPE REF TO /ork/if_logger.
with
Method
Creates a new logger with one additional context entry.

Convenience method equivalent to calling WITH_CONTEXT with a single key/value pair.

If the key already exists in the logger context, the value is overwritten.

The original logger instance is not modified. Scope hierarchy is not affected.

Parameters

NameDescriptionkeyContext keyvalContext valueresultNew logger instance including the context entry

Signature

METHODS with IMPORTING !key TYPE string
                         val TYPE string
               RETURNING VALUE(result) TYPE REF TO /ork/if_logger.
child
Method
Creates a hierarchical child logger.

Returns a new logger instance that inherits the current context and extends the logger scope by the supplied value.

Scope represents an ordered hierarchical path (e.g. class → method → operation).

Each call to CHILD appends one additional scope segment. Existing scope segments are preserved and not overwritten.

Scope is stored separately from context and written to each created log entry.

The original logger instance remains unchanged.

Parameters

NameDescriptionscopeScope segment (e.g. class or component name)resultNew child logger instance

Signature

METHODS child IMPORTING !scope TYPE string
                RETURNING VALUE(result) TYPE REF TO /ork/if_logger.
clear
Method
Clears all stored log entries.

Signature

METHODS clear.
flush
Method
Flushes entries to target system.

Persistence depends on implementation.

Signature

METHODS flush.
12 items
Types
ty_s_map
Type

Key/value pair used to represent structured parameters.

Signature

BEGIN OF ty_s_map,
      key TYPE string,
      val TYPE string,
    END OF ty_s_map.
ty_th_map
Type

Signature

TYPES ty_th_map TYPE HASHED TABLE OF ty_s_map WITH UNIQUE KEY key
                                                       WITH NON-UNIQUE SORTED KEY sorted_val COMPONENTS val.
ty_ts_map
Type

Signature

TYPES ty_ts_map TYPE SORTED TABLE OF ty_s_map WITH NON-UNIQUE KEY key
                                                       WITH NON-UNIQUE SORTED KEY sorted_val COMPONENTS val.
ty_tsu_map
Type

Signature

TYPES ty_tsu_map TYPE SORTED TABLE OF ty_s_map WITH UNIQUE KEY key
                                                       WITH NON-UNIQUE SORTED KEY sorted_val COMPONENTS val.
ty_tts_map
Type

Signature

TYPES ty_tts_map TYPE STANDARD TABLE OF ty_s_map WITH EMPTY KEY
                                                         WITH NON-UNIQUE SORTED KEY sorted_key COMPONENTS key
                                                         WITH NON-UNIQUE SORTED KEY sorted_val COMPONENTS val.
ty_tt_context
Type

Context key/value pairs attached to a logger instance. Context entries are inherited by child loggers and automatically added to every created log entry.

Signature

TYPES ty_tt_context TYPE ty_tts_map.
ty_tt_scope
Type

Signature

TYPES ty_tt_scope TYPE string_table.
ty_type
Type

Signature

TYPES ty_type TYPE sy-msgty.
ty_s_log_entry_data
Type

Data portion of a log entry (without timestamp).

Signature

BEGIN OF ty_s_log_entry_data,
      type TYPE string,
      message TYPE string,
      params TYPE ty_tts_map, " optional
      message_object TYPE REF TO if_message, " optional
      sy_message TYPE REF TO symsg, " optional
      cargo TYPE REF TO data, " optional
    END OF ty_s_log_entry_data.
ty_s_log_entry
Type

Complete log entry including timestamp.

Signature

BEGIN OF ty_s_log_entry,
           stamp TYPE timestampl.
end
Type

Signature

TYPES END OF ty_s_log_entry.
ty_tt_entries
Type

Signature

TYPES ty_tt_entries TYPE STANDARD TABLE OF ty_s_log_entry WITH EMPTY KEY
                                                 WITH NON-UNIQUE SORTED KEY k_stamp COMPONENTS stamp
                                                 WITH NON-UNIQUE SORTED KEY k_type COMPONENTS type
                                                 WITH NON-UNIQUE SORTED KEY k_message COMPONENTS message
                                                 WITH NON-UNIQUE SORTED KEY k_message_object COMPONENTS message_object.
1 item
Constants
cm_type
Constant

Predefined log level constants.

Signature

BEGIN OF cm_type,
      i TYPE ty_type VALUE 'I',
      s TYPE ty_type VALUE 'S',
      w TYPE ty_type VALUE 'W',
      e TYPE ty_type VALUE 'E',
    END OF cm_type.
Repository11 packages · 112 objects
123 items