From 4fe46e117e41163268d743417211a82c0db7f1a8 Mon Sep 17 00:00:00 2001 From: "Jerry (Xinyu Hou)" Date: Thu, 9 Jul 2015 14:10:52 -0700 Subject: [PATCH] Shorten data transfer log #4858 --- src/lib/client/ServerProxy.cpp | 4 ++-- src/lib/server/ClientProxy1_5.cpp | 2 +- src/lib/server/ClientProxy1_6.cpp | 2 +- src/lib/synergy/ClipboardChunk.cpp | 3 +-- src/lib/synergy/DropHelper.cpp | 4 +--- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/lib/client/ServerProxy.cpp b/src/lib/client/ServerProxy.cpp index ac01df35..0722bdfd 100644 --- a/src/lib/client/ServerProxy.cpp +++ b/src/lib/client/ServerProxy.cpp @@ -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())); } } } diff --git a/src/lib/server/ClientProxy1_5.cpp b/src/lib/server/ClientProxy1_5.cpp index 09c85995..2cdceb40 100644 --- a/src/lib/server/ClientProxy1_5.cpp +++ b/src/lib/server/ClientProxy1_5.cpp @@ -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())); } } } diff --git a/src/lib/server/ClientProxy1_6.cpp b/src/lib/server/ClientProxy1_6.cpp index 40c8eae8..9df8808d 100644 --- a/src/lib/server/ClientProxy1_6.cpp +++ b/src/lib/server/ClientProxy1_6.cpp @@ -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; diff --git a/src/lib/synergy/ClipboardChunk.cpp b/src/lib/synergy/ClipboardChunk.cpp index b17a52a1..d3d6de28 100644 --- a/src/lib/synergy/ClipboardChunk.cpp +++ b/src/lib/synergy/ClipboardChunk.cpp @@ -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; } diff --git a/src/lib/synergy/DropHelper.cpp b/src/lib/synergy/DropHelper.cpp index 314f8d14..a5fde5f1 100644 --- a/src/lib/synergy/DropHelper.cpp +++ b/src/lib/synergy/DropHelper.cpp @@ -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")); } }