Shorten data transfer log #4858

This commit is contained in:
Jerry (Xinyu Hou) 2015-07-09 14:10:52 -07:00
parent 485547d6ea
commit 4fe46e117e
5 changed files with 6 additions and 9 deletions

View File

@ -569,7 +569,7 @@ ServerProxy::setClipboard()
}
else if (r == kStart) {
size_t size = ClipboardChunk::getExpectedSize();
LOG((CLOG_DEBUG "clipboard transmission started: start receiving %u bytes of clipboard data", size));
LOG((CLOG_DEBUG "receiving %u bytes of clipboard data", size));
}
}
@ -873,7 +873,7 @@ ServerProxy::fileChunkReceived()
else if (result == kStart) {
if (m_client->getDragFileList().size() > 0) {
String filename = m_client->getDragFileList().at(0).getFilename();
LOG((CLOG_DEBUG "file transmission started: start receiving %s", filename.c_str()));
LOG((CLOG_DEBUG "start receiving %s", filename.c_str()));
}
}
}

View File

@ -93,7 +93,7 @@ ClientProxy1_5::fileChunkReceived()
else if (result == kStart) {
if (server->getFakeDragFileList().size() > 0) {
String filename = server->getFakeDragFileList().at(0).getFilename();
LOG((CLOG_DEBUG "file transmission started: start receiving %s", filename.c_str()));
LOG((CLOG_DEBUG "start receiving %s", filename.c_str()));
}
}
}

View File

@ -95,7 +95,7 @@ ClientProxy1_6::recvClipboard()
}
else if (r == kStart) {
size_t size = ClipboardChunk::getExpectedSize();
LOG((CLOG_DEBUG "clipboard transmission started: start receiving %u bytes of clipboard data", size));
LOG((CLOG_DEBUG "receiving %u bytes of clipboard data", size));
}
return true;

View File

@ -115,13 +115,12 @@ ClipboardChunk::assemble(synergy::IStream* stream,
}
else if (s_expectedSize != dataCached.size()) {
LOG((CLOG_ERR "corrupted clipboard data, expected size=%d actual size=%d", s_expectedSize, dataCached.size()));
LOG((CLOG_DEBUG "clipboard transmission failed: corrupted clipboard data"));
return kError;
}
return kFinish;
}
LOG((CLOG_DEBUG "clipboard transmission failed: unknow error"));
LOG((CLOG_ERR "clipboard transmission failed: unknow error"));
return kError;
}

View File

@ -38,18 +38,16 @@ DropHelper::writeToDir(const String& destination, DragFileList& fileList, String
file.open(dropTarget.c_str(), std::ios::out | std::ios::binary);
if (!file.is_open()) {
LOG((CLOG_ERR "drop file failed: can not open %s", dropTarget.c_str()));
LOG((CLOG_DEBUG "file transmission failed: can not open %s", dropTarget.c_str()));
}
file.write(data.c_str(), data.size());
file.close();
LOG((CLOG_DEBUG "file transmission complete: %s is saved to %s", fileList.at(0).getFilename().c_str(), destination.c_str()));
LOG((CLOG_DEBUG "%s is saved to %s", fileList.at(0).getFilename().c_str(), destination.c_str()));
fileList.clear();
}
else {
LOG((CLOG_ERR "drop file failed: drop target is empty"));
LOG((CLOG_DEBUG "file transmission failed: drop target is empty"));
}
}