Open Monograph Press
3.3.0
|
Public Member Functions | |
__construct ($template=self::CLF) | |
format (RequestInterface $request, ResponseInterface $response=null, \Exception $error=null) | |
Data Fields | |
const | CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}" |
const | DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}" |
const | SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}' |
Formats log messages using variable substitutions for requests, responses, and other transactional data.
The following variable substitutions are supported:
*
with the lowercased name of a request header to add to the message*
with the lowercased name of a response header to add to the messageDefinition at line 35 of file vendor/guzzlehttp/guzzle/src/MessageFormatter.php.
GuzzleHttp\MessageFormatter::__construct | ( | $template = self::CLF | ) |
string | $template | Log message template |
Definition at line 55 of file vendor/guzzlehttp/guzzle/src/MessageFormatter.php.
GuzzleHttp\MessageFormatter::format | ( | RequestInterface | $request, |
ResponseInterface | $response = null , |
||
\Exception | $error = null |
||
) |
Returns a formatted message string.
RequestInterface | $request | Request that was sent |
ResponseInterface | $response | Response that was received |
\Exception | $error | Exception that was received |
Definition at line 69 of file vendor/guzzlehttp/guzzle/src/MessageFormatter.php.
Referenced by GuzzleHttp\Middleware\log().
const GuzzleHttp\MessageFormatter::CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}" |
Apache Common Log Format. http://httpd.apache.org/docs/2.4/logs.html#common
Definition at line 43 of file vendor/guzzlehttp/guzzle/src/MessageFormatter.php.
const GuzzleHttp\MessageFormatter::DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}" |
Definition at line 44 of file vendor/guzzlehttp/guzzle/src/MessageFormatter.php.
const GuzzleHttp\MessageFormatter::SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}' |
Definition at line 45 of file vendor/guzzlehttp/guzzle/src/MessageFormatter.php.