Downgrade log levels which printed too frequently 54/112254/1
authorKyungwook Tak <k.tak@samsung.com>
Tue, 31 Jan 2017 01:05:27 +0000 (10:05 +0900)
committerKyungwook Tak <k.tak@samsung.com>
Tue, 31 Jan 2017 01:05:27 +0000 (10:05 +0900)
Change-Id: I1af4abcf28e42ea4659782d358c27cd603a0e93c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
src/framework/service/cs-logic.cpp
src/framework/service/file-system.cpp
src/framework/service/server-service.cpp

index ed0542e..6320ca1 100644 (file)
@@ -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) {
index 6d5ac4f..28a078c 100644 (file)
@@ -296,7 +296,7 @@ void FsVisitor::run(const DirPtr &dirptr, const FilePtr &currentdir)
                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())
index b540269..9248b46 100644 (file)
@@ -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: {