|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| __construct ($template=self::DEFAULT_FORMAT) | |
| format (RequestInterface $request, Response $response=null, CurlHandle $handle=null, array $customData=array()) | |
| setTemplate ($template) | |
Data Fields | |
| const | DEBUG_FORMAT = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{curl_stderr}" |
| const | DEFAULT_FORMAT = "{hostname} {req_header_User-Agent} - [{ts}] \"{method} {resource} {protocol}/{version}\" {code} {res_header_Content-Length}" |
| const | SHORT_FORMAT = '[{ts}] "{method} {resource} {protocol}/{version}" {code}' |
Protected Attributes | |
| $template | |
Message formatter used in various places in the framework
Format messages using a template that can contain the the following variables:
* 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 39 of file lib/vendor/guzzle/guzzle/src/Guzzle/Log/MessageFormatter.php.
| Guzzle\Log\MessageFormatter::__construct | ( | $template = self::DEFAULT_FORMAT | ) |
| string | $template | Log message template |
Definition at line 56 of file lib/vendor/guzzle/guzzle/src/Guzzle/Log/MessageFormatter.php.
References Guzzle\Log\MessageFormatter\$template, and Guzzle\Log\MessageFormatter\DEFAULT_FORMAT.
| Guzzle\Log\MessageFormatter::format | ( | RequestInterface | $request, |
| Response | $response = null, |
||
| CurlHandle | $handle = null, |
||
| array | $customData = array() |
||
| ) |
Returns a formatted message
| RequestInterface | $request | Request that was sent |
| Response | $response | Response that was received |
| CurlHandle | $handle | Curl handle associated with the message |
| array | $customData | Associative array of custom template data |
Definition at line 85 of file lib/vendor/guzzle/guzzle/src/Guzzle/Log/MessageFormatter.php.
References Guzzle\Log\MessageFormatter\$template, Guzzle\Http\Message\MessageInterface\getHeader(), Guzzle\Http\Message\RequestInterface\getHost(), Guzzle\Http\Message\RequestInterface\getMethod(), Guzzle\Http\Message\RequestInterface\getPort(), Guzzle\Http\Message\RequestInterface\getProtocolVersion(), Guzzle\Http\Message\RequestInterface\getResource(), and Guzzle\Http\Message\RequestInterface\getUrl().
| Guzzle\Log\MessageFormatter::setTemplate | ( | $template | ) |
Set the template to use for logging
| string | $template | Log message template |
Definition at line 68 of file lib/vendor/guzzle/guzzle/src/Guzzle/Log/MessageFormatter.php.
References Guzzle\Log\MessageFormatter\$template.
|
protected |
Template used to format log messages
Definition at line 51 of file lib/vendor/guzzle/guzzle/src/Guzzle/Log/MessageFormatter.php.
Referenced by Guzzle\Log\MessageFormatter\__construct(), Guzzle\Log\MessageFormatter\format(), and Guzzle\Log\MessageFormatter\setTemplate().
| const Guzzle\Log\MessageFormatter::DEBUG_FORMAT = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{curl_stderr}" |
Definition at line 42 of file lib/vendor/guzzle/guzzle/src/Guzzle/Log/MessageFormatter.php.
| const Guzzle\Log\MessageFormatter::DEFAULT_FORMAT = "{hostname} {req_header_User-Agent} - [{ts}] \"{method} {resource} {protocol}/{version}\" {code} {res_header_Content-Length}" |
Definition at line 41 of file lib/vendor/guzzle/guzzle/src/Guzzle/Log/MessageFormatter.php.
Referenced by Guzzle\Log\MessageFormatter\__construct().
| const Guzzle\Log\MessageFormatter::SHORT_FORMAT = '[{ts}] "{method} {resource} {protocol}/{version}" {code}' |
Definition at line 43 of file lib/vendor/guzzle/guzzle/src/Guzzle/Log/MessageFormatter.php.