Proof: improve logging
Tell if the key loading happened due to a Poco vs std exception. If we show the response headers, show the request headers as well. Change-Id: Idb32e8c4d9cc5565647b99d6ddae27cd2faba46f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92518 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
parent
927f77354c
commit
4992de990d
2 changed files with 15 additions and 4 deletions
|
@ -148,11 +148,11 @@ Proof::Proof()
|
|||
}
|
||||
catch (const Poco::Exception& e)
|
||||
{
|
||||
LOG_ERR("Could not open proof RSA key: " << e.displayText());
|
||||
LOG_ERR("Could not open proof RSA key, Poco exception: " << e.displayText());
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG_ERR("Could not open proof RSA key: " << e.what());
|
||||
LOG_ERR("Could not open proof RSA key, standard exception: " << e.what());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
|
|
@ -532,16 +532,27 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const Au
|
|||
const auto startTime = std::chrono::steady_clock::now();
|
||||
|
||||
std::unique_ptr<Poco::Net::HTTPClientSession> psession(getHTTPClientSession(uriObject));
|
||||
Log::StreamLogger logger = Log::trace();
|
||||
if (logger.enabled())
|
||||
{
|
||||
logger << "WOPI::CheckFileInfo request header for URI [" << uriAnonym << "]:\n";
|
||||
for (const auto& pair : request)
|
||||
{
|
||||
logger << '\t' << pair.first << ": " << pair.second << " / ";
|
||||
}
|
||||
|
||||
LOG_END(logger, true);
|
||||
}
|
||||
|
||||
psession->sendRequest(request);
|
||||
|
||||
Poco::Net::HTTPResponse response;
|
||||
std::istream& rs = psession->receiveResponse(response);
|
||||
callDuration = (std::chrono::steady_clock::now() - startTime);
|
||||
|
||||
Log::StreamLogger logger = Log::trace();
|
||||
if (logger.enabled())
|
||||
{
|
||||
logger << "WOPI::CheckFileInfo header for URI [" << uriAnonym << "]:\n";
|
||||
logger << "WOPI::CheckFileInfo response header for URI [" << uriAnonym << "]:\n";
|
||||
for (const auto& pair : response)
|
||||
{
|
||||
logger << '\t' << pair.first << ": " << pair.second << " / ";
|
||||
|
|
Loading…
Reference in a new issue