\AlibabaCloud\Client\LogLogFormatter

Summary

Methods
Properties
Constants
__construct()
format()
$template
No constants found
No protected methods found
No protected properties found
N/A
getCost()
$logStartTime
$ts
N/A

Properties

$template

$template : string

Type

string — Template used to format log messages

$logStartTime

$logStartTime : float

Type

float

$ts

$ts : \DateTime

Type

\DateTime

Methods

__construct()

__construct(string  $template) 

Parameters

string $template

Log message template

Throws

\Exception

format()

format(\Psr\Http\Message\RequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response = null, \Exception  $error = null) : string

Returns a formatted message string.

Parameters

\Psr\Http\Message\RequestInterface $request

Request that was sent

\Psr\Http\Message\ResponseInterface $response

Response that was received

\Exception $error

Exception that was received

Returns

string

getCost()

getCost() : float|mixed

Returns

float|mixed