Guzzle http 正在截断超过 120 个字符的异常,但我需要记录完整的异常消息。我怎样才能做到这一点?
我正在使用 Laravel 4.2.22。
最佳答案
Laravel 5 和 4 是一样的
try {
$response = $client->post($path, $params);
} catch (\GuzzleHttp\Exception\RequestException $ex) {
\Log::debug('error');
\Log::debug((string) $ex->getResponse()->getBody());
throw $ex;
}
如果你只是去
$ex->getMessage()
,你会得到(truncated...)
在最后。
关于laravel - 错误日志在 Guzzle http 的 Laravel 中被截断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53862823/