Organize log for print tree
[platform/core/connectivity/stc-manager.git] / src / database / tables / table-statistics.c
index 49856b4..436c55d 100755 (executable)
@@ -594,7 +594,7 @@ stc_error_e table_statistics_insert(stc_db_classid_iftype_key *stat_key,
 {
        stc_error_e error_code = STC_ERROR_NONE;
        sqlite3_stmt *stmt = update_statistics_query;
-       stc_hw_net_protocol_type_e hw_net_protocol_type = STC_PROTOCOL_NONE;
+       stc_hw_net_protocol_type_e hw_net_protocol_type = STC_PROTOCOL_UNKNOWN;
 
        if (!stat->rcv_count && !stat->snd_count) {
                error_code = STC_ERROR_INVALID_PARAMETER;
@@ -628,7 +628,8 @@ stc_error_e table_statistics_insert(stc_db_classid_iftype_key *stat_key,
                goto handle_error; //LCOV_EXCL_LINE
        }
 
-       STC_LOGD("App stat recorded [%s]", stat->app_id);
+       if (STC_DEBUG_LOG)
+               STC_LOGD("App stat recorded [%s]", stat->app_id);
 
 handle_error:
        sqlite3_reset(stmt);