Set STC_DEBUG_LOG flag
[platform/core/connectivity/stc-manager.git] / src / monitor / stc-monitor.c
index fc7b7bb..0e34821 100755 (executable)
@@ -292,6 +292,7 @@ static void __processes_tree_printall(GTree *processes)
        g_tree_foreach(processes, __processes_tree_foreach_print, NULL);
 }
 
+#if STC_DEBUG_LOG
 static gboolean __apps_tree_foreach_print(gpointer key, gpointer value,
                                          gpointer data)
 {
@@ -308,6 +309,7 @@ static gboolean __apps_tree_foreach_print(gpointer key, gpointer value,
        __processes_tree_printall(app_value->processes);
        return FALSE;
 }
+#endif
 
 #if 0
 static void __apps_tree_printall(void)
@@ -323,7 +325,9 @@ static gboolean __apps_tree_foreach_remove_pid(gpointer key, gpointer value,
        stc_app_value_s *app_value = (stc_app_value_s *)value;
 
        if (!g_tree_remove(app_value->processes, context->proc_key)) {
+#if STC_DEBUG_LOG
                STC_LOGD("key not found");
+#endif
                return FALSE;
        }
 
@@ -964,14 +968,18 @@ static void __app_counter_update(stc_app_key_s *app_key,
                app_value->counter.in_bytes = context->bytes;
                g_system->apps_tree_updated = TRUE;
 
+#if STC_DEBUG_LOG
                __apps_tree_foreach_print(app_key, app_value, NULL);
+#endif
                break;
        case NFACCT_COUNTER_OUT:
                app_value->data_usage.out_bytes += context->bytes;
                app_value->counter.out_bytes = context->bytes;
                g_system->apps_tree_updated = TRUE;
 
+#if STC_DEBUG_LOG
                __apps_tree_foreach_print(app_key, app_value, NULL);
+#endif
                break;
        default:
                STC_LOGE("unknown iotype");