From 846099959bceae56111d5dddf79dbac43ea12cb9 Mon Sep 17 00:00:00 2001 From: Kyungwook Tak Date: Tue, 31 Jan 2017 10:05:27 +0900 Subject: Downgrade log levels which printed too frequently Change-Id: I1af4abcf28e42ea4659782d358c27cd603a0e93c Signed-off-by: Kyungwook Tak --- src/framework/service/cs-logic.cpp | 4 ++-- src/framework/service/file-system.cpp | 2 +- src/framework/service/server-service.cpp | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/framework/service/cs-logic.cpp b/src/framework/service/cs-logic.cpp index ed0542e..6320ca1 100644 --- a/src/framework/service/cs-logic.cpp +++ b/src/framework/service/cs-logic.cpp @@ -328,7 +328,7 @@ int CsLogic::scanApp(const CsContext &context, const FilePtr &pkgPtr, Db::RowShPtr jWorse; auto &riskiest = cache.riskiest; - INFO("start to judge scan stage on pkg[" << pkgPath << "]"); + DEBUG("start to judge scan stage on pkg[" << pkgPath << "]"); switch (this->judgeScanStage(riskiest, history, isHistoryDeleted, since, jWorse)) { case CsLogic::ScanStage::NEW_RISKIEST : this->m_db->transactionBegin(); @@ -696,7 +696,7 @@ RawBuffer CsLogic::scanDirsAsync(const ConnShPtr &conn, const CsContext &context break; } - DEBUG("Malware detected!!!"); + INFO("Malware detected!!!"); conn->send(BinaryQueue::Serialize(ASYNC_EVENT_MALWARE_DETECTED).pop()); conn->send(BinaryQueue::Serialize(malware).pop()); } else if (context.isScannedCbRegistered) { diff --git a/src/framework/service/file-system.cpp b/src/framework/service/file-system.cpp index 6d5ac4f..28a078c 100644 --- a/src/framework/service/file-system.cpp +++ b/src/framework/service/file-system.cpp @@ -296,7 +296,7 @@ void FsVisitor::run(const DirPtr &dirptr, const FilePtr ¤tdir) auto fullpath = (parent_dirpath.back() == '/') ? (parent_dirpath + name) : (parent_dirpath + "/" + name); - INFO("start to traverse file: " << fullpath); + DEBUG("start to traverse file: " << fullpath); if (result->d_type == DT_LNK) { if (!currentdir->isInApp()) diff --git a/src/framework/service/server-service.cpp b/src/framework/service/server-service.cpp index b540269..9248b46 100644 --- a/src/framework/service/server-service.cpp +++ b/src/framework/service/server-service.cpp @@ -45,6 +45,7 @@ namespace Csr { namespace { +#if !defined(NDEBUG) #define CID_TOSTRING(name) case CommandId::name: return #name std::string cidToString(const CommandId &cid) { @@ -73,6 +74,7 @@ std::string cidToString(const CommandId &cid) } } #undef CID_TOSTRING +#endif inline CommandId extractCommandId(BinaryQueue &q) { @@ -128,7 +130,7 @@ RawBuffer ServerService::processCs(const ConnShPtr &conn, RawBuffer &data) auto cid = extractCommandId(q); - INFO("Content scanning request process. command id: " << cidToString(cid)); + DEBUG("Content scanning request process. command id: " << cidToString(cid)); switch (cid) { case CommandId::SCAN_DATA: { @@ -289,7 +291,7 @@ RawBuffer ServerService::processWp(const ConnShPtr &conn, RawBuffer &data) auto cid = extractCommandId(q); - INFO("Web protection request process. command id: " << cidToString(cid)); + DEBUG("Web protection request process. command id: " << cidToString(cid)); switch (cid) { case CommandId::CHECK_URL: { @@ -338,7 +340,7 @@ RawBuffer ServerService::processAdmin(const ConnShPtr &conn, RawBuffer &data) hasPermission(conn); - INFO("Admin request process. command id: " << cidToString(cid)); + DEBUG("Admin request process. command id: " << cidToString(cid)); switch (cid) { case CommandId::EM_GET_NAME: { -- cgit v1.2.3