chore: Improve logging in Server::onClipboardChanged
This commit is contained in:
parent
98d03fb098
commit
0352e1c6d6
1 changed files with 6 additions and 9 deletions
|
|
@ -1400,7 +1400,7 @@ void Server::onClipboardChanged(const BaseClientProxy *sender, ClipboardID id, u
|
||||||
|
|
||||||
// ignore update if sequence number is old
|
// ignore update if sequence number is old
|
||||||
if (seqNum < clipboard.m_clipboardSeqNum) {
|
if (seqNum < clipboard.m_clipboardSeqNum) {
|
||||||
LOG((CLOG_INFO "ignored screen \"%s\" update of clipboard %d (missequenced)", getName(sender).c_str(), id));
|
LOG_INFO("ignored screen \"%s\" update of clipboard %d (mis-sequenced)", getName(sender).c_str(), id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1412,24 +1412,21 @@ void Server::onClipboardChanged(const BaseClientProxy *sender, ClipboardID id, u
|
||||||
|
|
||||||
std::string data = clipboard.m_clipboard.marshall();
|
std::string data = clipboard.m_clipboard.marshall();
|
||||||
if (data.size() > m_maximumClipboardSize * 1024) {
|
if (data.size() > m_maximumClipboardSize * 1024) {
|
||||||
LOG(
|
LOG_NOTE(
|
||||||
(CLOG_NOTE "not updating clipboard because it's over the size limit "
|
"not updating clipboard because it's over the size limit (%i KB) configured by the server",
|
||||||
"(%i KB) configured by the server",
|
m_maximumClipboardSize
|
||||||
m_maximumClipboardSize)
|
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore if data hasn't changed
|
// ignore if data hasn't changed
|
||||||
if (data == clipboard.m_clipboardData) {
|
if (data == clipboard.m_clipboardData) {
|
||||||
LOG(
|
LOG_DEBUG("ignored screen \"%s\" update of clipboard %d (unchanged)", clipboard.m_clipboardOwner.c_str(), id);
|
||||||
(CLOG_DEBUG "ignored screen \"%s\" update of clipboard %d (unchanged)", clipboard.m_clipboardOwner.c_str(), id)
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// got new data
|
// got new data
|
||||||
LOG((CLOG_INFO "screen \"%s\" updated clipboard %d", clipboard.m_clipboardOwner.c_str(), id));
|
LOG_INFO("screen \"%s\" updated clipboard %d", clipboard.m_clipboardOwner.c_str(), id);
|
||||||
clipboard.m_clipboardData = data;
|
clipboard.m_clipboardData = data;
|
||||||
|
|
||||||
// tell all clients except the sender that the clipboard is dirty
|
// tell all clients except the sender that the clipboard is dirty
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue