\Google\AdsApi\CommonSoapLogMessageFormatter

Stores and formats logging information about a single ads SOAP API call.

Summary

Methods
Properties
Constants
__construct()
formatSummary()
formatDetailed()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
formatSoapFaultForSummary()
getServer()
$FAULT_MSG_MAX_LEN_DEFAULT
$requestHttpHeadersToScrub
$requestSoapHeadersToScrub
$requestSoapBodyTagsToScrub
$additionalRequestSummaryHeaders
$additionalResponseSummaryHeaders
$faultMsgMaxLength
N/A

Properties

$FAULT_MSG_MAX_LEN_DEFAULT

$FAULT_MSG_MAX_LEN_DEFAULT :

Type

$requestHttpHeadersToScrub

$requestHttpHeadersToScrub :

Type

$requestSoapHeadersToScrub

$requestSoapHeadersToScrub :

Type

$requestSoapBodyTagsToScrub

$requestSoapBodyTagsToScrub :

Type

$additionalRequestSummaryHeaders

$additionalRequestSummaryHeaders :

Type

$additionalResponseSummaryHeaders

$additionalResponseSummaryHeaders :

Type

$faultMsgMaxLength

$faultMsgMaxLength :

Type

Methods

__construct()

__construct(array<mixed,string>|null  $requestHttpHeadersToScrub = null,array<mixed,string>|null  $requestSoapHeadersToScrub = null,array<mixed,string>|null  $requestSoapBodyTagsToScrub = null,array<mixed,string>|null  $additionalRequestSummaryHeaders = null,array<mixed,string>|null  $additionalResponseSummaryHeaders = null,integer|null  $faultMsgMaxLength = null)

Creates a new SOAP log formatter with the specified settings.

Parameters

array<mixed,string>|null $requestHttpHeadersToScrub

a list of request HTTP headers to scrub

array<mixed,string>|null $requestSoapHeadersToScrub

a list of request SOAP headers to scrub

array<mixed,string>|null $requestSoapBodyTagsToScrub

a list of request SOAP body tags to scrub

array<mixed,string>|null $additionalRequestSummaryHeaders

a list of additional SOAP request headers to be included in the summary

array<mixed,string>|null $additionalResponseSummaryHeaders

a list of additional SOAP response headers to be included in the summary

integer|null $faultMsgMaxLength

the number of characters to limit SOAP fault messages to in the info log

formatSummary()

formatSummary(string  $serviceName,string  $methodName,string  $requestHeaders,string  $request,string  $response,\SoapFault|null  $soapFault = null): string

Formats this log message as a summary line.

Parameters

string $serviceName

the name of the service the request was made to

string $methodName

the name of the method that was called

string $requestHeaders

the HTTP headers from the request

string $request

the SOAP request

string $response

the SOAP response for the request

\SoapFault|null $soapFault

a SOAP fault if the request failed

Returns

string —

the formatted summary log message

formatDetailed()

formatDetailed(string  $requestHeaders,string  $request,string  $responseHeaders,string  $response): string

Formats this log message as a detailed message containing full SOAP XML request and response payloads, along with their HTTP headers.

Parameters

string $requestHeaders

the HTTP headers from the request

string $request

the SOAP request

string $responseHeaders

the HTTP headers from the response

string $response

the SOAP response for the request

Returns

string —

the formatted detailed log message

formatSoapFaultForSummary()

formatSoapFaultForSummary(string  $soapFault): string

Removes line breaks and truncates the SOAP fault if necessary.

Parameters

string $soapFault

Returns

string

getServer()

getServer(  $requestHeaders)

Parameters

$requestHeaders