Reduce the logs for debugging.
authorSung-jae Park <nicesj.park@samsung.com>
Wed, 26 Jun 2013 23:51:40 +0000 (08:51 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Wed, 26 Jun 2013 23:51:40 +0000 (08:51 +0900)
[model] Redwood
[binary_type] AP
[customer] Docomo/Orange/Open
[issue#] N/A
[problem] Too much logs are printed.
[cause] To analyze the issues.
[solution] Reduce the unnecessary logs which for already stabilized modules.
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: Icc008977136f50dbe98b87c852f911b8b2ae49e9

packaging/com.samsung.data-provider-slave.spec
src/lb.c
src/util.c

index 24617f5..b53bdff 100644 (file)
@@ -2,7 +2,7 @@
 
 Name: com.samsung.data-provider-slave
 Summary: Plugin type livebox service provider.
-Version: 0.11.10
+Version: 0.11.11
 Release: 1
 Group: HomeTF/Livebox
 License: Flora License
index 144699e..e5d6e6e 100644 (file)
--- a/src/lb.c
+++ b/src/lb.c
@@ -118,10 +118,8 @@ static inline int pd_is_opened(const char *pkgname)
 
        i = 0;
        EINA_LIST_FOREACH(s_info.pd_list, l, tmp) {
-               if (pkgname && !strcmp(pkgname, tmp)) {
-                       DbgPrint("PD(%s) is opened\n", pkgname);
+               if (pkgname && !strcmp(pkgname, tmp))
                        return 1;
-               }
 
                i++;
        }
@@ -141,7 +139,6 @@ static Eina_Bool pd_open_pended_cmd_consumer_cb(void *data)
                return ECORE_CALLBACK_RENEW;
 
        s_info.pd_open_pending_list = eina_list_remove(s_info.pd_open_pending_list, item);
-       DbgPrint("Consuming pended item: %s\n", item->inst->id);
        /*!
         * \note
         * To prevent from checking the is_updated function
@@ -152,7 +149,6 @@ static Eina_Bool pd_open_pended_cmd_consumer_cb(void *data)
 
 cleanout:
        s_info.pd_open_pending_timer = NULL;
-       DbgPrint("open pd pending list exhausted\n");
        return ECORE_CALLBACK_CANCEL;
 }
 
@@ -168,7 +164,6 @@ static Eina_Bool pended_cmd_consumer_cb(void *data)
                return ECORE_CALLBACK_RENEW;
 
        s_info.pending_list = eina_list_remove(s_info.pending_list, item);
-       DbgPrint("Consuming pended item: %s\n", item->inst->id);
        /*!
         * \note
         * To prevent from checking the is_updated function
@@ -180,7 +175,6 @@ static Eina_Bool pended_cmd_consumer_cb(void *data)
 cleanout:
        s_info.pending_timer = NULL;
        s_info.pending_timer_freezed = 0;
-       DbgPrint("pending list exhausted\n");
        return ECORE_CALLBACK_CANCEL;
 }
 
@@ -199,10 +193,8 @@ static inline __attribute__((always_inline)) int activate_pending_consumer(void)
         * Do not increase the freezed counter.
         * Just freeze the timer.
         */
-       if (s_info.pending_timer_freezed) {
-               DbgPrint("Pending timer created and freezed\n");
+       if (s_info.pending_timer_freezed)
                ecore_timer_freeze(s_info.pending_timer);
-       }
 
        return 0;
 }
@@ -215,7 +207,6 @@ static inline void deactivate_pending_consumer(void)
        ecore_timer_del(s_info.pending_timer);
        s_info.pending_timer = NULL;
        s_info.pending_timer_freezed = 0;
-       DbgPrint("Clear the pending timer\n");
 }
 
 static inline void deactivate_pd_open_pending_consumer(void)
@@ -225,7 +216,6 @@ static inline void deactivate_pd_open_pending_consumer(void)
 
        ecore_timer_del(s_info.pd_open_pending_timer);
        s_info.pd_open_pending_timer = NULL;
-       DbgPrint("Clear the open_pd_pending timer\n");
 }
 
 static inline int __attribute__((always_inline)) activate_pd_open_pending_consumer(void)
@@ -258,15 +248,11 @@ static inline void migrate_to_pd_open_pending_list(const char *pkgname)
                cnt++;
        }
 
-       if (s_info.pd_open_pending_list) {
-               DbgPrint("Activate PD open pending consumer (%s)\n", pkgname);
+       if (s_info.pd_open_pending_list)
                activate_pd_open_pending_consumer();
-       }
 
        if (!s_info.pending_list)
                deactivate_pending_consumer();
-
-       DbgPrint("%d items are migrated\n", cnt);
 }
 
 static inline void migrate_to_pending_list(const char *pkgname)
@@ -290,8 +276,6 @@ static inline void migrate_to_pending_list(const char *pkgname)
 
        if (!s_info.pd_open_pending_list)
                deactivate_pd_open_pending_consumer();
-
-       DbgPrint("%d items are migrated\n", cnt);
 }
 
 static inline int append_pending_list(struct item *item)
@@ -302,7 +286,6 @@ static inline int append_pending_list(struct item *item)
                        return LB_STATUS_ERROR_EXIST;
                }
 
-               DbgPrint("Activate PD open pending consumer (%s)\n", item->inst->item->pkgname);
                if (activate_pd_open_pending_consumer() < 0) {
                        ErrPrint("Failed to activate PD open pending consumer\n");
                        return LB_STATUS_ERROR_FAULT;
@@ -338,16 +321,13 @@ static inline void timer_thaw(struct item *item)
        pending = ecore_timer_pending_get(item->timer);
        delay = util_time_delay_for_compensation(period) - pending;
        ecore_timer_delay(item->timer, delay);
-       DbgPrint("Compensated: %lf, Instance %s resume timer\n", delay, item->inst->item->pkgname);
 
        if (item->sleep_at == 0.0f)
                return;
 
        sleep_time = util_timestamp() - item->sleep_at;
-       if (sleep_time > pending) {
-               DbgPrint("Update time elapsed\n");
+       if (sleep_time > pending)
                (void)updator_cb(item);
-       }
 
        item->sleep_at = 0.0f;
 }
@@ -371,7 +351,6 @@ static inline void timer_freeze(struct item *item)
        }
 
        item->sleep_at = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0f;
-       DbgPrint("Instance %s freeze timer\n", item->inst->item->pkgname);
 }
 
 static inline void update_monitor_cnt(struct item *item)
@@ -512,9 +491,9 @@ static int file_updated_cb(const char *filename, void *data, int over)
                                        item->inst->w, item->inst->h, item->inst->priority, content, title);
        } else {
                item->is_lb_updated++;
-               DbgPrint("Livebox script is not ready yet [%d]\n", item->is_lb_updated);
        }
 
+       DbgPrint("CONTENT %s is updated [%d]\n", filename, item->is_lb_updated);
        return output_handler(item);
 }
 
@@ -560,7 +539,7 @@ static Eina_Bool update_timeout_cb(void *data)
 
        item = data;
 
-       DbgPrint("UPDATE TIMEOUT ========> %s - %s\n", item->inst->item->pkgname, item->inst->id);
+       ErrPrint("UPDATE TIMEOUT ========> %s - %s\n", item->inst->item->pkgname, item->inst->id);
 
        if (s_info.update != item)
                ErrPrint("Updating item is not matched\n");
@@ -696,7 +675,6 @@ static inline int add_desc_update_monitor(const char *id, struct item *item)
        }
 
        snprintf(filename, len, "%s.desc", util_uri_to_path(id));
-       DbgPrint("Add DESC monitor: %s\n", filename);
        return update_monitor_add_update_cb(filename, desc_updated_cb, item);
 }
 
@@ -874,7 +852,6 @@ HAPI int lb_create(const char *pkgname, const char *id, const char *content_info
                return ret;
        }
 
-       DbgPrint("Content: [%s]\n", content_info);
        create_ret = so_create(pkgname, id, content_info, timeout, has_livebox_script, cluster, category, abi, &inst);
        if (create_ret < 0) {
                update_monitor_del(id,  item);
@@ -1150,10 +1127,9 @@ HAPI int lb_script_event(const char *pkgname, const char *id, const char *emissi
        if (emission && source && !strcmp(source, id)) {
                if (item->inst->item->has_livebox_script) {
                        if (!strcmp(emission, "lb,show")) {
-                               DbgPrint("Livebox(%s) script is ready now\n", id);
                                item->is_lb_show = 1;
 
-                               DbgPrint("Updated %d times, (content: %s), (title: %s)\n", item->is_lb_updated, item->inst->content, item->inst->title);
+                               DbgPrint("[%s] Updated %d times, (content: %s), (title: %s)\n", id, item->is_lb_updated, item->inst->content, item->inst->title);
                                if (item->is_lb_updated) {
                                        provider_send_updated(item->inst->item->pkgname, item->inst->id,
                                                                item->inst->w, item->inst->h, item->inst->priority, item->inst->content, item->inst->title);
@@ -1358,7 +1334,6 @@ HAPI int lb_delete_all_deleteme(void)
        struct item *item;
        int cnt = 0;
 
-       DbgPrint("Delete all deleteme\n");
        EINA_LIST_FOREACH_SAFE(s_info.item_list, l, n, item) {
                if (!item->deleteme)
                        continue;
@@ -1371,7 +1346,7 @@ HAPI int lb_delete_all_deleteme(void)
                cnt++;
        }
 
-       DbgPrint("Deleteme: %d\n", cnt);
+       DbgPrint("Delete all deleteme: %d\n", cnt);
        return LB_STATUS_SUCCESS;
 }
 
@@ -1407,10 +1382,8 @@ HAPI void lb_pause_all(void)
                        continue;
                }
 
-               if (item->is_paused) {
-                       DbgPrint("Instance %s is already paused\n", item->inst->id);
+               if (item->is_paused)
                        continue;
-               }
 
                timer_freeze(item);
 
@@ -1433,10 +1406,8 @@ HAPI void lb_resume_all(void)
                        continue;
                }
 
-               if (item->is_paused) {
-                       DbgPrint("Instance %s is still paused\n", item->inst->id);
+               if (item->is_paused)
                        continue;
-               }
 
                timer_thaw(item);
 
@@ -1471,10 +1442,8 @@ HAPI int lb_pause(const char *pkgname, const char *id)
 
        item->is_paused = 1;
 
-       if (s_info.paused) {
-               DbgPrint("Already paused: %s\n", item->inst->id);
+       if (s_info.paused)
                return LB_STATUS_SUCCESS;
-       }
 
        timer_freeze(item);
 
@@ -1510,10 +1479,8 @@ HAPI int lb_resume(const char *pkgname, const char *id)
 
        item->is_paused = 0;
 
-       if (s_info.paused) {
-               DbgPrint("Instance %s is still paused\n", item->inst->id);
+       if (s_info.paused)
                return LB_STATUS_SUCCESS;
-       }
 
        timer_thaw(item);
 
index d8c9e4e..0d502b3 100644 (file)
@@ -185,7 +185,6 @@ HAPI double util_time_delay_for_compensation(double period)
        remain = curtime % _period;
 
        ret = (double)remain / (double)1000000;
-       DbgPrint("curtime: %llu, _period: %llu (%lf), remain: %llu, ret: %lf, result: %lf\n", curtime, _period, period, remain, ret, period - ret);
        return period - ret;
 }
 
@@ -200,7 +199,6 @@ HAPI void *util_timer_add(double interval, Eina_Bool (*cb)(void *data), void *da
 
        delay = util_time_delay_for_compensation(interval) - interval;
        ecore_timer_delay(timer, delay);
-       DbgPrint("Compensate timer: %lf\n", delay);
 
        return timer;
 }