[Libreoffice-commits] online.git: wsd/ProofKey.cpp wsd/Storage.cpp
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 20 07:23:18 UTC 2020
wsd/ProofKey.cpp | 4 ++--
wsd/Storage.cpp | 15 +++++++++++++--
2 files changed, 15 insertions(+), 4 deletions(-)
New commits:
commit 4992de990d8becba3a9b6412c9ec7d611fd5d6bd
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Apr 20 09:07:25 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Apr 20 09:22:59 2020 +0200
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 at gmail.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/wsd/ProofKey.cpp b/wsd/ProofKey.cpp
index 01817ed8f..2c390c19b 100644
--- a/wsd/ProofKey.cpp
+++ b/wsd/ProofKey.cpp
@@ -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 (...)
{
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 9adc57656..ad4249f4c 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -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 << " / ";
More information about the Libreoffice-commits
mailing list