/AWS1/IF_CWL=>GETLOGOBJECT()
¶
About GetLogObject¶
Retrieves a large logging object (LLO) and streams it back. This API is used to fetch the
content of large portions of log events that have been ingested through the
PutOpenTelemetryLogs API. When log events contain fields that would cause the total event size
to exceed 1MB, CloudWatch Logs automatically processes up to 10 fields, starting with the
largest fields. Each field is truncated as needed to keep the total event size as close to 1MB
as possible. The excess portions are stored as Large Log Objects (LLOs) and these fields are
processed separately and LLO reference system fields (in the format
@ptr.$[path.to.field]
) are added. The path in the reference field reflects the
original JSON structure where the large field was located. For example, this could be
@ptr.$['input']['message']
, @ptr.$['AAA']['BBB']['CCC']['DDD']
,
@ptr.$['AAA']
, or any other path matching your log structure.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_logobjectpointer
TYPE /AWS1/CWLLOGOBJECTPOINTER
/AWS1/CWLLOGOBJECTPOINTER
¶
A pointer to the specific log object to retrieve. This is a required parameter that uniquely identifies the log object within CloudWatch Logs. The pointer is typically obtained from a previous query or filter operation.
Optional arguments:¶
iv_unmask
TYPE /AWS1/CWLUNMASK
/AWS1/CWLUNMASK
¶
A boolean flag that indicates whether to unmask sensitive log data. When set to true, any masked or redacted data in the log object will be displayed in its original form. Default is false.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_cwlgetlogobjectrsp
/AWS1/CL_CWLGETLOGOBJECTRSP
¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->/aws1/if_cwl~getlogobject(
iv_logobjectpointer = |string|
iv_unmask = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
TRY.
WHILE lo_result->get_fieldstream( )->/aws1/if_rt_stream_reader~data_available( ) = ABAP_TRUE.
lo_event = lo_result->get_fieldstream( )->READ( ).
IF lo_event->get_fields( ) IS NOT INITIAL.
" process this kind of event
ENDIF.
ENDWHILE.
CATCH /aws1/cx_cwlinternalstrmgex.
" handle error in stream
ENDTRY.
ENDIF.