wsd: improved logging

Change-Id: I9c10803f451b6226c6a15d89acd4758c04042f28
Reviewed-on: https://gerrit.libreoffice.org/32864
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2017-01-08 12:22:21 -05:00 committed by Ashod Nakashian
parent fe9e95dfa3
commit b2160ee3a7
3 changed files with 10 additions and 3 deletions

View file

@ -97,7 +97,7 @@ public:
const auto count = std::stoi(tokens[1]);
if (count > 0)
{
LOG_INF("Spawning " << tokens[1] << ' ' << (count == 1 ? "child" : "children") << " per request.");
LOG_INF("Setting to spawn " << tokens[1] << " child" << (count == 1 ? "" : "ren") << " per request.");
ForkCounter = count;
}
else

View file

@ -1220,9 +1220,12 @@ private:
if (size == disconnect.size() &&
strncmp(data, disconnect.data(), disconnect.size()) == 0)
{
LOG_DBG("Removing ChildSession " << sessionId);
LOG_DBG("Removing ChildSession [" << sessionId << "].");
_oldSessionIds[session->getViewId()] = UserInfo({session->getViewUserId(), session->getViewUserName()});
_sessions.erase(it);
const auto count = _sessions.size();
LOG_DBG("Have " << count << " child" << (count == 1 ? "" : "ren") <<
" after removing ChildSession [" << sessionId << "].");
// No longer needed, and allow session dtor to take it.
lock.unlock();

View file

@ -652,6 +652,9 @@ size_t DocumentBroker::removeSession(const std::string& id)
try
{
LOG_INF("Removing session [" << id << "] on docKey [" << _docKey <<
"]. Have " << _sessions.size() << " sessions.");
Admin::instance().rmDoc(_docKey, id);
auto it = _sessions.find(id);
@ -672,7 +675,8 @@ size_t DocumentBroker::removeSession(const std::string& id)
}
else
{
LOG_TRC("Session [" << id << "] not found to remove from docKey [" << _docKey << "]");
LOG_TRC("Session [" << id << "] not found to remove from docKey [" <<
_docKey << "]. Have " << _sessions.size() << " sessions.");
}
}
catch (const std::exception& ex)