summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-09-29 23:32:45 -0400
committerMichael Meeks <michael.meeks@collabora.com>2019-10-28 10:48:01 +0100
commita4a4d656322f69c9f7c6b5ac54f8c8baeacc5a86 (patch)
tree1579e90c7d35104f74f35e31ffe422149f123895
parentwsd: reduce public surface area of DocumentBroker (diff)
downloadonline-a4a4d656322f69c9f7c6b5ac54f8c8baeacc5a86.tar.gz
online-a4a4d656322f69c9f7c6b5ac54f8c8baeacc5a86.zip
wsd: logging improvements
Always log when we set the termination flag so we can trace how (and implicitly why) we terminated. In practice trace logging is not enabled, so a key event such as termination should be logged at info level. Reviewed-on: https://gerrit.libreoffice.org/80324 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 3f8d516e1399df687c2935fc551b171cbd850b7b) Change-Id: Id6615181c81ea56777f44b551b39925065b0e578 Reviewed-on: https://gerrit.libreoffice.org/81562 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--common/Log.hpp2
-rw-r--r--kit/Kit.cpp2
-rw-r--r--net/Socket.cpp7
-rw-r--r--wsd/LOOLWSD.cpp1
4 files changed, 6 insertions, 6 deletions
diff --git a/common/Log.hpp b/common/Log.hpp
index df0a06536a..495b4f0e95 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -233,7 +233,7 @@ namespace Log
if (id != std::thread::id())
{
std::ostringstream os;
- os << std::hex << "0x" << id << std::dec;
+ os << std::hex << "0x" << id;
return os.str();
}
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 4c59b8d79f..d6d255bf18 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -2141,7 +2141,7 @@ protected:
}
else if (tokens[0] == "exit")
{
- LOG_TRC("Setting TerminationFlag due to 'exit' command from parent.");
+ LOG_INF("Setting TerminationFlag due to 'exit' command from parent.");
SigUtil::getTerminationFlag() = true;
document.reset();
}
diff --git a/net/Socket.cpp b/net/Socket.cpp
index 345e1d6524..cf70871702 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -174,11 +174,9 @@ void SocketPoll::pollingThreadEntry()
try
{
Util::setThreadName(_name);
- LOG_INF("Starting polling thread [" << _name << "].");
-
_owner = std::this_thread::get_id();
- LOG_DBG("Thread affinity of " << _name << " set to " <<
- Log::to_string(_owner) << ".");
+ LOG_INF("Starting polling thread [" << _name << "] with thread affinity set to "
+ << Log::to_string(_owner) << '.');
// Invoke the virtual implementation.
pollingThread();
@@ -193,6 +191,7 @@ void SocketPoll::pollingThreadEntry()
}
_threadFinished = true;
+ LOG_INF("Finished polling thread [" << _name << "].");
}
void SocketPoll::wakeupWorld()
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index ca08808129..d7ebcbb26f 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1574,6 +1574,7 @@ void PrisonerPoll::wakeupHook()
// block until the replay finishes
replayThread->join();
+ LOG_INF("Setting TerminationFlag");
SigUtil::getTerminationFlag() = true;
}
#endif