Before this change, the information that is written
to the log for requests with a non 200 return status
is not very helpful. A variable $errors is created,
but never used.
This patch writes the $errors and the request body
to the log.
Change-Id: If62ec801d59b2343890f4238e5a534d034d934ad
} else {
$errors = $status->getErrorsByType( 'error' );
$logger = LoggerFactory::getInstance( 'http' );
- $logger->warning( $status->getWikiText(), array( 'caller' => $caller ) );
+ $logger->warning( $status->getWikiText(),
+ array( 'error' => $errors, 'caller' => $caller, 'content' => $req->getContent() ) );
return false;
}
}