Reduce log string and format 07/141607/6
authorSeungha Son <seungha.son@samsung.com>
Tue, 1 Aug 2017 01:17:25 +0000 (10:17 +0900)
committerSeungha Son <seungha.son@samsung.com>
Wed, 2 Aug 2017 05:33:58 +0000 (14:33 +0900)
 - Remove duplicate data from output
 - Remove special characters
 - Remove unnecessary information output
 - Remove repeated information from log

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: If0a32829fa0881e812f5bd0bbad05afc26f38901

include/util.h
src/badge_service.c
src/critical_log.c
src/main.c
src/notification_service.c
src/pkgmgr.c
src/service_common.c
src/shortcut_service.c
src/util.c

index ed661d2..a4f1de8 100755 (executable)
@@ -27,7 +27,7 @@ do { \
        int ret; \
        ret = pthread_mutex_lock(handle); \
        if (ret != 0) \
-               ERR("pthread_mutex_lock: %d\n", ret); \
+               ERR("pthread_mutex_lock: %d", ret); \
 } while (0)
 
 #define CRITICAL_SECTION_END(handle) \
@@ -35,31 +35,31 @@ do { \
        int ret; \
        ret = pthread_mutex_unlock(handle); \
        if (ret != 0) \
-               ERR("pthread_mutex_unlock: %d\n", ret); \
+               ERR("pthread_mutex_unlock: %d", ret); \
 } while (0)
 
 #define CANCEL_SECTION_BEGIN() do { \
        int ret; \
        ret = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); \
        if (ret != 0) \
-               ERR("Unable to set cancelate state: %d\n", ret); \
+               ERR("Unable to set cancelate state: %d", ret); \
 } while (0)
 
 #define CANCEL_SECTION_END() do { \
        int ret; \
        ret = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); \
        if (ret != 0) \
-               ERR("Unable to set cancelate state: %d\n", ret); \
+               ERR("Unable to set cancelate state: %d", ret); \
 } while (0)
 
 #define CLOSE_PIPE(p)  do { \
        int status; \
        status = close(p[PIPE_READ]); \
        if (status < 0) \
-               ERR("close: %d\n", errno); \
+               ERR("close: %d", errno); \
        status = close(p[PIPE_WRITE]); \
        if (status < 0) \
-               ERR("close: %d\n", errno); \
+               ERR("close: %d", errno); \
 } while (0)
 
 #define PIPE_READ 0
index a7921cc..62656d6 100755 (executable)
@@ -39,17 +39,17 @@ static void _on_name_appeared(GDBusConnection *connection,
                const gchar     *name_owner,
                gpointer         user_data)
 {
-       DBG("name appeared : %s", name);
+       DBG("name [%s]", name);
 }
 
 static void _on_name_vanished(GDBusConnection *connection,
                const gchar     *name,
                gpointer         user_data)
 {
-       DBG("name vanished : %s", name);
+       DBG("name [%s]", name);
        monitoring_info_s *info = (monitoring_info_s *)user_data;
        if (info) {
-               DBG("name vanished uid : %d", info->uid);
+               DBG("vanished uid [%d]", info->uid);
                g_bus_unwatch_name(info->watcher_id);
                delete_monitoring_list(&_monitoring_hash, name, info->uid);
 
@@ -65,7 +65,7 @@ static void _badge_dbus_method_call_handler(GDBusConnection *conn,
                GVariant *parameters, GDBusMethodInvocation *invocation,
                gpointer user_data)
 {
-       DBG("badge method_name: %s", method_name);
+       DBG("badge method_name [%s]", method_name);
 
        GVariant *reply_body = NULL;
        int ret = BADGE_ERROR_INVALID_PARAMETER;
@@ -99,11 +99,12 @@ static void _badge_dbus_method_call_handler(GDBusConnection *conn,
                ret = badge_init_display(parameters, &reply_body, uid);
 
        if (ret == BADGE_ERROR_NONE) {
-               DBG("badge service success : %d", ret);
+               DBG("Badge service success, method [%s]", method_name);
                g_dbus_method_invocation_return_value(
                                invocation, reply_body);
        } else {
-               DBG("badge service fail : %d", ret);
+               ERR("Badge service fail, method_name[%s] err[%d]",
+                       method_name, ret);
                g_dbus_method_invocation_return_error(
                                invocation,
                                BADGE_ERROR,
@@ -205,7 +206,7 @@ static int _validate_and_set_param_uid_with_uid(uid_t uid, uid_t *param_uid)
        int ret = BADGE_ERROR_NONE;
 
        if (uid > NORMAL_UID_BASE && uid != *param_uid) {
-               ERR("invalid sender uid : %d, param_uid : %d", uid, *param_uid);
+               ERR("Invalid sender uid[%d] param_uid[%d]", uid, *param_uid);
                return BADGE_ERROR_INVALID_PARAMETER;
        } else if (uid <= NORMAL_UID_BASE) {
                if (*param_uid <= NORMAL_UID_BASE) {
@@ -236,7 +237,6 @@ int badge_get_badge_existing(GVariant *parameters, GVariant **reply_body, uid_t
        uid_t param_uid;
 
        g_variant_get(parameters, "(&si)", &pkgname, &param_uid);
-       DBG("badge_get_badge_existing %s", pkgname);
 
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != BADGE_ERROR_NONE)
@@ -253,16 +253,19 @@ int badge_get_badge_existing(GVariant *parameters, GVariant **reply_body, uid_t
        }
 
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to get badge existing :%d\n", ret);
+               ERR("Failed to get badge existing :%d", ret);
                return ret;
+       } else {
+               INFO("The badge of [%s] exists", pkgname);
        }
 
        *reply_body = g_variant_new("(i)", existing);
        if (*reply_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make gvariant");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
-       DBG("badge_get_badge_existing service done");
+
+       DBG("result [%d]", ret);
        return ret;
 }
 
@@ -285,7 +288,7 @@ int badge_get_badge_list(GVariant *parameters, GVariant **reply_body, uid_t uid)
 
        ret = badge_db_get_list(&badge_list, param_uid);
        if (ret != BADGE_ERROR_NONE) {
-               ERR("badge get list fail : %d", ret);
+               ERR("Failed to get list [%d]", ret);
                return ret;
        }
 
@@ -302,11 +305,11 @@ int badge_get_badge_list(GVariant *parameters, GVariant **reply_body, uid_t uid)
        g_variant_builder_unref(builder);
 
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("badge_get_badge_list done !!");
+       DBG("Success to get badge list");
        return BADGE_ERROR_NONE;
 }
 
@@ -338,20 +341,20 @@ int badge_insert(GVariant *parameters, GVariant **reply_body, uid_t uid)
        }
 
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to insert badge :%d\n", ret);
+               ERR("Failed to insert badge [%d]", ret);
                return ret;
        }
 
        ret = badge_db_get_allow_to_display_by_appid(pkgname, &allow_to_display, param_uid);
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to get allow_to_display by appid : %d\n", ret);
+               ERR("Failed to get allow_to_display by appid [%d]", ret);
                return ret;
        }
 
        if (allow_to_display) {
                body = g_variant_new("(si)", pkgname, param_uid);
                if (body == NULL) {
-                       ERR("cannot make gvariant to noti");
+                       ERR("Failed to make gvariant");
                        return BADGE_ERROR_OUT_OF_MEMORY;
                }
 
@@ -359,18 +362,18 @@ int badge_insert(GVariant *parameters, GVariant **reply_body, uid_t uid)
                g_variant_unref(body);
 
                if (ret != BADGE_ERROR_NONE) {
-                       ERR("failed to send notify:%d\n", ret);
+                       ERR("Failed to send notify [%d]", ret);
                        return ret;
                }
        }
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make reply");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
-       INFO("badge insert : pkgname [%s], writable_pkg [%s], caller [%s]", pkgname, writable_pkg, caller);
+       INFO("Success, pkgname[%s] writable_pkg[%s] caller[%s]", pkgname, writable_pkg, caller);
 
        return ret;
 }
@@ -396,13 +399,13 @@ int badge_delete(GVariant *parameters, GVariant **reply_body, uid_t uid, pid_t p
                return BADGE_ERROR_INVALID_PARAMETER;
 
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to delete badge :%d\n", ret);
+               ERR("Failed to delete badge [%d]", ret);
                return ret;
        }
 
        body = g_variant_new("(si)", pkgname, param_uid);
        if (body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make gvariant");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
@@ -410,17 +413,17 @@ int badge_delete(GVariant *parameters, GVariant **reply_body, uid_t uid, pid_t p
        g_variant_unref(body);
 
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to send notify:%d\n", ret);
+               ERR("Failed to send notify:%d", ret);
                return ret;
        }
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make reply");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
-       INFO("badge delete : pkgname [%s], caller [%s]", pkgname, caller);
+       INFO("success, pkgname[%s] caller[%s]", pkgname, caller);
 
        return ret;
 }
@@ -453,20 +456,20 @@ int badge_set_badge_count(GVariant *parameters, GVariant **reply_body, uid_t uid
        }
 
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to set badge :%d\n", ret);
+               ERR("Failed to set badge [%d]", ret);
                return ret;
        }
 
        ret = badge_db_get_allow_to_display_by_appid(pkgname, &allow_to_display, param_uid);
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to get allow_to_display by appid : %d\n", ret);
+               ERR("Failed to get allow_to_display [%d]", ret);
                return ret;
        }
 
        if (allow_to_display) {
                body = g_variant_new("(sii)", pkgname, count, param_uid);
                if (body == NULL) {
-                       ERR("cannot make gvariant to noti");
+                       ERR("Failed to make gvariant");
                        return BADGE_ERROR_OUT_OF_MEMORY;
                }
 
@@ -474,19 +477,18 @@ int badge_set_badge_count(GVariant *parameters, GVariant **reply_body, uid_t uid
                g_variant_unref(body);
 
                if (ret != BADGE_ERROR_NONE) {
-                       ERR("failed to send notify:%d\n", ret);
+                       ERR("Failed to send notify [%d]", ret);
                        return ret;
                }
-               DBG("send badge count notify done ret : %d", ret);
        }
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make reply");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
-       INFO("set count : pkgname [%s], caller [%s], count[%d]", pkgname, caller, count);
+       INFO("Success, pkgname[%s] caller[%s] count[%d]", pkgname, caller, count);
 
        return ret;
 }
@@ -511,16 +513,17 @@ int badge_get_badge_count(GVariant *parameters, GVariant **reply_body, uid_t uid
                return BADGE_ERROR_INVALID_PARAMETER;
 
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to get badge count :%d\n", ret);
+               ERR("Failed to get badge count [%d]", ret);
                return ret;
        }
 
        *reply_body = g_variant_new("(i)", count);
        if (*reply_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make gvariant");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
-       DBG("badge_get_badge_count service done");
+
+       INFO("Success, count[%d]", count);
        return ret;
 }
 
@@ -547,20 +550,20 @@ int badge_set_display_option(GVariant *parameters, GVariant **reply_body, uid_t
                return BADGE_ERROR_INVALID_PARAMETER;
 
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to set display option :%d\n", ret);
+               ERR("Failed to set display option [%d]", ret);
                return ret;
        }
 
        ret = badge_db_get_allow_to_display_by_appid(pkgname, &allow_to_display, param_uid);
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to get allow_to_display by appid : %d\n", ret);
+               ERR("Failed to get allow_to_display [%d]", ret);
                return ret;
        }
 
        if (allow_to_display) {
                body = g_variant_new("(sii)", pkgname, is_display, param_uid);
                if (body == NULL) {
-                       ERR("cannot make gvariant to noti");
+                       ERR("Failed to make gvariant");
                        return BADGE_ERROR_OUT_OF_MEMORY;
                }
 
@@ -568,18 +571,19 @@ int badge_set_display_option(GVariant *parameters, GVariant **reply_body, uid_t
                g_variant_unref(body);
 
                if (ret != BADGE_ERROR_NONE) {
-                       ERR("failed to send notify:%d\n", ret);
+                       ERR("Failed to send notify [%d]", ret);
                        return ret;
                }
        }
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make reply");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
-       INFO("set disp option : pkgname [%s], caller [%s], is_dispaly[%d]", pkgname, caller, is_display);
+       INFO("Success, pkgname[%s] caller[%s] is_dispaly[%d]",
+               pkgname, caller, is_display);
 
        return ret;
 }
@@ -609,21 +613,22 @@ int badge_get_display_option(GVariant *parameters, GVariant **reply_body, const
        if (ret != BADGE_ERROR_NONE)
                return ret;
 
-       DBG("get disp option : %s", pkgname);
-
-       if (pkgname != NULL)
+       if (pkgname != NULL) {
                ret = badge_db_get_display_option(pkgname, &is_display, param_uid);
-       else
+       }
+       else {
+               ERR("Invalid pkgname");
                return BADGE_ERROR_INVALID_PARAMETER;
+       }
 
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to get display option :%d\n", ret);
+               ERR("Failed to get display option [%d]", ret);
                return ret;
        }
 
        ret = badge_db_get_allow_to_display_by_appid(pkgname, &allow_to_display, param_uid);
        if (ret != BADGE_ERROR_NONE) {
-               ERR("failed to get allow_to_display by appid : %d\n", ret);
+               ERR("Failed to get allow_to_display [%d]", ret);
                return ret;
        }
 
@@ -638,10 +643,11 @@ int badge_get_display_option(GVariant *parameters, GVariant **reply_body, const
 
        *reply_body = g_variant_new("(i)", is_display);
        if (*reply_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make reply");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
+       INFO("Success, display option[%d]", is_display);
        return ret;
 }
 
@@ -652,14 +658,14 @@ static int __badge_emit_fake_signal(char *appid, unsigned int disp_option, uid_t
 
        fake_body = g_variant_new("(sii)", appid, disp_option, uid);
        if (fake_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make gvariant");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
        ret = send_notify(fake_body, "set_disp_option_notify", &_monitoring_hash, PROVIDER_BADGE_INTERFACE_NAME, uid);
        g_variant_unref(fake_body);
        if (ret != BADGE_ERROR_NONE)
-               ERR("failed to send notify:%d\n", ret);
+               ERR("Failed to send notify [%d]", ret);
 
        return ret;
 }
@@ -687,7 +693,7 @@ int badge_update_badge_setting(GVariant *parameters, GVariant **reply_body, uid_
 
        ret = badge_db_update_setting(pkgname, appid, allow_to_display, param_uid);
        if (ret != BADGE_ERROR_NONE) {
-               ERR("Failed badge setting update");
+               ERR("Failed to update badge setting [%d]", ret);
                return ret;
        }
 
@@ -698,7 +704,7 @@ int badge_update_badge_setting(GVariant *parameters, GVariant **reply_body, uid_
        } else {
                ret = badge_db_get_display_option(appid, &disp_option, param_uid);
                if (ret != BADGE_ERROR_NONE && ret != BADGE_ERROR_NOT_EXIST) {
-                       ERR("Failed badge_db_get_display_option");
+                       ERR("Failed to get display_option [%d]", ret);
                        return ret;
                }
 
@@ -711,10 +717,11 @@ int badge_update_badge_setting(GVariant *parameters, GVariant **reply_body, uid_
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("Cannot make reply_body");
-               ret = BADGE_ERROR_OUT_OF_MEMORY;
+               ERR("Failed to make reply_body");
+               return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
+       INFO("Success, pkgname[%s], appid[%s]", pkgname, appid);
        return ret;
 }
 
@@ -744,7 +751,7 @@ int badge_get_setting_by_appid(GVariant *parameters, GVariant **reply_body, uid_
                body = badge_ipc_make_gvariant_from_setting(setting);
                badge_setting_free_setting(setting);
                if (body == NULL) {
-                       ERR("fail to make gvariant from setting");
+                       ERR("Failed to make gvariant from setting");
                        return NOTIFICATION_ERROR_OUT_OF_MEMORY;
                }
        } else {
@@ -753,10 +760,11 @@ int badge_get_setting_by_appid(GVariant *parameters, GVariant **reply_body, uid_
 
        *reply_body = g_variant_new("(v)", body);
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply");
                return BADGE_ERROR_OUT_OF_MEMORY;
        }
 
+       INFO("Success, appid[%d]", appid);
        return ret;
 }
 
@@ -779,7 +787,7 @@ int badge_init_display(GVariant *parameters, GVariant **reply_body, uid_t uid)
 
        ret = badge_db_get_list(&badge_list, param_uid);
        if (ret != BADGE_ERROR_NONE) {
-               ERR("badge get list fail : %d", ret);
+               ERR("Failed to get list [%d]", ret);
                return ret;
        }
 
@@ -790,13 +798,13 @@ int badge_init_display(GVariant *parameters, GVariant **reply_body, uid_t uid)
 
                ret = badge_db_get_display_option(badge->pkg, &disp_option, param_uid);
                if (ret != BADGE_ERROR_NONE) {
-                       ERR("failed to get display option");
+                       ERR("Failed to get display option [%d]", ret);
                        continue;
                }
 
                ret = badge_db_get_allow_to_display_by_appid(badge->pkg, &allow_to_display, param_uid);
                if (ret != BADGE_ERROR_NONE) {
-                       ERR("failed to get allow_to_display");
+                       ERR("Failed to get allow_to_display [%d]", ret);
                        continue;
                }
 
@@ -804,7 +812,7 @@ int badge_init_display(GVariant *parameters, GVariant **reply_body, uid_t uid)
                        body = g_variant_new("(sii)", badge->pkg, disp_option, param_uid);
                        ret = send_notify(body, "set_disp_option_notify", &_monitoring_hash, PROVIDER_BADGE_INTERFACE_NAME, param_uid);
                        if (ret != BADGE_ERROR_NONE) {
-                               ERR("failed to get allow_to_display");
+                               ERR("Failed to send notify");
                                continue;
                        }
                        g_variant_unref(body);
@@ -816,10 +824,11 @@ int badge_init_display(GVariant *parameters, GVariant **reply_body, uid_t uid)
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
+       DBG("result [%d]", ret);
        return ret;
 }
 
@@ -834,13 +843,13 @@ HAPI int badge_service_init(void)
        _monitoring_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
        result = badge_db_init();
        if (result != BADGE_ERROR_NONE) {
-               ERR("badge db init fail %d", result);
+               ERR("Failed to init DB [%d]", result);
                return result;
        }
 
        result = badge_register_dbus_interface();
        if (result != SERVICE_COMMON_ERROR_NONE) {
-               ERR("badge register dbus fail %d", result);
+               ERR("Failed to register dbus interface [%d]", result);
                return BADGE_ERROR_IO_ERROR;
        }
 
index bf4c10f..dd61930 100755 (executable)
@@ -64,7 +64,7 @@ static inline void rotate_log(void)
                snprintf(filename, namelen, "%s/%d_%s.%d", CONF_LOG_PATH, s_info.file_id, s_info.filename, getpid());
                if (s_info.fp) {
                        if (fclose(s_info.fp) != 0)
-                               ERR("fclose: %d\n", errno);
+                               ERR("fclose [%d]", errno);
                }
 
                if (access(filename, F_OK) == 0)
@@ -72,7 +72,7 @@ static inline void rotate_log(void)
 
                s_info.fp = fopen(filename, "w+x");
                if (!s_info.fp)
-                       ERR("Failed to open a file: %s\n", filename);
+                       ERR("Failed to open a file [%s][%d]", filename, errno);
 
                free(filename);
        }
@@ -116,7 +116,7 @@ HAPI int critical_log_init(const char *name)
 
        s_info.filename = strdup(name);
        if (!s_info.filename) {
-               ERR("Failed to create a log file\n");
+               ERR("Failed to create a log file");
                return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
        }
 
@@ -124,7 +124,7 @@ HAPI int critical_log_init(const char *name)
 
        filename = malloc(namelen);
        if (!filename) {
-               ERR("Failed to create a log file\n");
+               ERR("Failed to create a log file");
                ret = SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
                goto out;
        }
@@ -136,7 +136,7 @@ HAPI int critical_log_init(const char *name)
 
        s_info.fp = fopen(filename, "w+x");
        if (!s_info.fp) {
-               ERR("fopen: %d\n", errno);
+               ERR("fopen [%s][%d]", filename, errno);
                ret = SERVICE_COMMON_ERROR_IO_ERROR;
        }
 
@@ -161,7 +161,7 @@ HAPI void critical_log_fini(void)
 
        if (s_info.fp) {
                if (fclose(s_info.fp) != 0)
-                       ERR("fclose: %d\n", errno);
+                       ERR("fclose [%d]", errno);
                s_info.fp = NULL;
        }
 }
index fb6e72c..a125e00 100755 (executable)
@@ -55,7 +55,7 @@ static void lang_key_changed_cb(keynode_t *node EINA_UNUSED, void *first)
                        if (r != NULL)
                                DBG("setlocale = %s", r);
                }
-               DBG("setlocale = %s", r);
+               DBG("setlocale [%s]", r);
                free(lang);
        }
 }
@@ -66,21 +66,21 @@ static inline int app_create(void)
 
        ret = vconf_notify_key_changed(VCONFKEY_LANGSET, lang_key_changed_cb, NULL);
        if (ret < 0)
-               DBG("VCONFKEY_LANGSET notify key chenaged: %d\n", ret);
+               DBG("VCONFKEY_LANGSET notify key chenaged [%d]", ret);
 
        lang_key_changed_cb(NULL, NULL);
 
        ret = shortcut_service_init();
        if (ret < 0)
-               DBG("shortcut: %d\n", ret);
+               DBG("shortcut [%d]", ret);
 
        ret = notification_service_init();
        if (ret < 0)
-               DBG("noti: %d\n", ret);
+               DBG("notification [%d]", ret);
 
        ret = badge_service_init();
        if (ret < 0)
-               DBG("badge: %d\n", ret);
+               DBG("badge [%d]", ret);
 
        service_common_init();
 
@@ -93,17 +93,17 @@ static inline int app_terminate(void)
 
        ret = badge_service_fini();
        if (ret < 0)
-               DBG("badge: %d\n", ret);
+               DBG("badge [%d]", ret);
 
        ret = notification_service_fini();
        if (ret < 0)
-               DBG("noti: %d\n", ret);
+               DBG("notification [%d]", ret);
 
        ret = shortcut_service_fini();
        if (ret < 0)
-               DBG("shortcut: %d\n", ret);
+               DBG("shortcut [%d]", ret);
 
-       DBG("Terminated\n");
+       DBG("Terminated");
        return 0;
 }
 
@@ -116,27 +116,27 @@ static Eina_Bool signal_cb(void *data, Ecore_Fd_Handler *handler)
 
        fd = ecore_main_fd_handler_fd_get(handler);
        if (fd < 0) {
-               ERR("Unable to get FD\n");
+               ERR("Unable to get FD");
                ecore_main_fd_handler_del(handler);
                return ECORE_CALLBACK_CANCEL;
        }
 
        size = read(fd, &fdsi, sizeof(fdsi));
        if (size != sizeof(fdsi)) {
-               ERR("read: %d\n", errno);
+               ERR("read [%d]", errno);
                ecore_main_fd_handler_del(handler);
                return ECORE_CALLBACK_CANCEL;
        }
 
        if (fdsi.ssi_signo == SIGTERM) {
-               CRITICAL_LOG("Terminated(SIGTERM)\n");
+               CRITICAL_LOG("Terminated(SIGTERM)");
                cfd = creat("/tmp/.stop.provider", 0644);
                if (cfd < 0 || close(cfd) < 0)
-                       ERR("stop.provider: %d\n", errno);
+                       ERR("stop.provider [%d]", errno);
 
                ecore_main_loop_quit();
        } else {
-               CRITICAL_LOG("Unknown SIG[%d] received\n", fdsi.ssi_signo);
+               CRITICAL_LOG("Unknown SIG[%d] received", fdsi.ssi_signo);
        }
 
        return ECORE_CALLBACK_RENEW;
@@ -168,25 +168,25 @@ int main(int argc, char *argv[])
         */
        ret = critical_log_init(util_basename(argv[0]));
        if (ret < 0)
-               ERR("Failed to init the critical log\n");
+               ERR("Failed to init the critical log");
 
        sigemptyset(&mask);
        ret = sigaddset(&mask, SIGTERM);
        if (ret < 0)
-               CRITICAL_LOG("sigaddset: %d\n", errno);
+               CRITICAL_LOG("sigaddset: %d", errno);
 
        ret = sigprocmask(SIG_BLOCK, &mask, NULL);
        if (ret < 0)
-               CRITICAL_LOG("sigprocmask: %d\n", errno);
+               CRITICAL_LOG("sigprocmask: %d", errno);
 
        ret = signalfd(-1, &mask, 0);
        if (ret < 0) {
-               CRITICAL_LOG("signalfd: %d\n", errno);
+               CRITICAL_LOG("signalfd: %d", errno);
        } else {
                signal_handler = ecore_main_fd_handler_add(
                                ret, ECORE_FD_READ, signal_cb,
                                NULL, NULL, NULL);
-               CRITICAL_LOG("Signal handler initialized: %d\n", ret);
+               CRITICAL_LOG("Signal handler initialized [%d]", ret);
        }
 
        app_create();
index 2e90b70..a777474 100755 (executable)
@@ -84,7 +84,7 @@ static void _on_name_appeared(GDBusConnection *connection,
 {
        monitoring_info_s *info = (monitoring_info_s *)user_data;
 
-       DBG("name appeared name : %s, uid : %d", name, info->uid);
+       DBG("name[%s], uid[%d]", name, info->uid);
 }
 
 static void _on_name_vanished(GDBusConnection *connection,
@@ -93,9 +93,8 @@ static void _on_name_vanished(GDBusConnection *connection,
 {
        monitoring_info_s *info = (monitoring_info_s *)user_data;
 
-       DBG("name vanished : %s", name);
        if (info) {
-               DBG("name vanished uid : %d", info->uid);
+               DBG("name[%s], uid[%d]", name, info->uid);
                notification_remove_private_sharing_target_id(name, info->uid);
                g_bus_unwatch_name(info->watcher_id);
                delete_monitoring_list(&_monitoring_hash, info->bus_name, info->uid);
@@ -113,7 +112,7 @@ static void _noti_dbus_method_call_handler(GDBusConnection *conn,
                gpointer user_data)
 {
        /* TODO : sender authority(privilege) check */
-       DBG("notification method_name: %s, sender : %s ", method_name, sender);
+       DBG("notification method_name[%s] sender[%s]", method_name, sender);
 
        GVariant *reply_body = NULL;
        int ret = NOTIFICATION_ERROR_INVALID_OPERATION;
@@ -205,11 +204,12 @@ static void _noti_dbus_method_call_handler(GDBusConnection *conn,
        }
 
        if (ret == NOTIFICATION_ERROR_NONE) {
-               DBG("notification service success : %d", ret);
+               DBG("notification service success, method name[%s]", method_name);
                g_dbus_method_invocation_return_value(
                                invocation, reply_body);
        } else {
-               DBG("notification service fail : %d", ret);
+               ERR("notification service fail, method_name[%s] err[%d]",
+                       method_name, ret);
                g_dbus_method_invocation_return_error(
                                invocation,
                                NOTIFICATION_ERROR,
@@ -438,13 +438,13 @@ static int _add_noti(GVariant **reply_body, notification_h noti, uid_t uid)
        print_noti(noti);
        ret = notification_noti_insert(noti);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to update a notification:%d\n", ret);
+               ERR("Failed to update a notification [%d]", ret);
                return ret;
        }
 
        ret = notification_get_id(noti, NULL, &priv_id);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to gets priv_id:%d\n", ret);
+               ERR("Failed to gets priv_id [%d]", ret);
                return ret;
        }
 
@@ -452,7 +452,7 @@ static int _add_noti(GVariant **reply_body, notification_h noti, uid_t uid)
 
        body = notification_ipc_make_gvariant_from_noti(noti, true);
        if (body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make gvariant to noti");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
@@ -460,25 +460,25 @@ static int _add_noti(GVariant **reply_body, notification_h noti, uid_t uid)
        g_variant_unref(body);
 
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to send notify:%d\n", ret);
+               ERR("Failed to send notify [%d]", ret);
                return ret;
        }
 
        if (default_viewer != NULL) {
                ret = notification_launch_default_viewer(default_viewer, priv_id);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to launch (app_control error : %d)", ret);
+                       ERR("Failed to launch default viewer [%d]", ret);
                        return NOTIFICATION_ERROR_IO_ERROR;
                }
        }
 
        *reply_body = g_variant_new("(i)", priv_id);
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("_insert_noti done !!");
+       DBG("Success to add notification");
        return ret;
 }
 
@@ -488,12 +488,12 @@ static int _validate_and_set_noti_with_uid(uid_t uid, notification_h noti, uid_t
 
        ret = notification_get_uid(noti, noti_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("notification_get_uid fail ret : %d", ret);
+               ERR("Failed to get uid [%d]", ret);
                return ret;
        }
 
        if (uid > NORMAL_UID_BASE && uid != *noti_uid) {
-               ERR("invalid seder uid : %d, noti_uid : %d", uid, *noti_uid);
+               ERR("Invalid seder uid[%d] noti_uid[%d]", uid, *noti_uid);
                return NOTIFICATION_ERROR_INVALID_PARAMETER;
        } else if (uid <= NORMAL_UID_BASE) {
                if (*noti_uid <= NORMAL_UID_BASE) {
@@ -508,10 +508,10 @@ static int _validate_and_set_noti_with_uid(uid_t uid, notification_h noti, uid_t
                        *noti_uid = tzplatform_getuid(TZ_SYS_DEFAULT_USER);
                        ret = notification_set_uid(noti, *noti_uid);
                        if (ret != NOTIFICATION_ERROR_NONE) {
-                               ERR("notification_set_uid fail ret : %d", ret);
+                               ERR("Failed to set uid [%d]", ret);
                                return ret;
                        }
-                       DBG("changed noti_uid %d", *noti_uid);
+                       DBG("changed noti_uid[%d]", *noti_uid);
                }
        }
        return ret;
@@ -521,7 +521,7 @@ static int _validate_and_set_param_uid_with_uid(uid_t uid, uid_t *param_uid)
 {
        int ret = NOTIFICATION_ERROR_NONE;
        if (uid > NORMAL_UID_BASE && uid != *param_uid) {
-               ERR("invalid seder uid : %d, param_uid : %d", uid, *param_uid);
+               ERR("invalid seder uid[%d], param_uid[%d]", uid, *param_uid);
                return NOTIFICATION_ERROR_INVALID_PARAMETER;
        } else if (uid <= NORMAL_UID_BASE) {
                if (*param_uid <= NORMAL_UID_BASE) {
@@ -542,7 +542,7 @@ static void __sender_name_appeared_cb(GDBusConnection *connection,
                                      const gchar *name_owner,
                                      gpointer user_data)
 {
-       DBG("sender name appeared name: %s, name_owner : %s", name, name_owner);
+       DBG("name[%s], name_owner[%s]", name, name_owner);
 }
 
 static void __sender_name_vanished_cb(GDBusConnection *connection,
@@ -557,7 +557,7 @@ static void __sender_name_vanished_cb(GDBusConnection *connection,
 
        info = (event_sender_info_s *)user_data;
 
-       DBG("sender name vanished name : %s, priv_id : %d, watcher_id : %d",
+       DBG("name[%s], priv_id[%d], watcher_id[%d]",
                 name, info->priv_id, info->watcher_id);
 
        delete_list = g_list_find_custom(__event_list, GINT_TO_POINTER(info->priv_id),
@@ -580,11 +580,11 @@ static guint __insert_sender_watcher_id(event_sender_info_s *sender_info)
                                      sender_info,
                                      NULL);
        if (!watcher_id) {
-               ERR("fail to watch sender name");
+               ERR("Failed to watch sender name");
                return 0;
        }
 
-       DBG("watch on %s success - watcher_id : %d", sender_info->busname, watcher_id);
+       DBG("Watch on busname[%s] watcher_id[%d]", sender_info->busname, watcher_id);
        return watcher_id;
 }
 
@@ -682,7 +682,6 @@ int notification_add_noti(GVariant *parameters, GVariant **reply_body, const cha
 out:
        notification_free(noti);
 
-       DBG("notification_add_noti ret : %d", ret);
        return ret;
 }
 
@@ -707,13 +706,13 @@ static int _update_noti(GVariant **reply_body, notification_h noti, uid_t uid)
 
        ret = notification_noti_update(noti);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to update a notification:%d\n", ret);
+               ERR("Failed to update a notification [%d]", ret);
                return ret;
        }
 
        ret = notification_get_id(noti, NULL, &priv_id);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to gets priv_id:%d\n", ret);
+               ERR("Failed to gets priv_id [%d]", ret);
                return ret;
        }
 
@@ -721,7 +720,7 @@ static int _update_noti(GVariant **reply_body, notification_h noti, uid_t uid)
 
        body = notification_ipc_make_gvariant_from_noti(noti, true);
        if (body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make gvariant to noti");
                return NOTIFICATION_ERROR_IO_ERROR;
        }
 
@@ -729,25 +728,25 @@ static int _update_noti(GVariant **reply_body, notification_h noti, uid_t uid)
        g_variant_unref(body);
 
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to send notify:%d\n", ret);
+               ERR("Failed to send notify [%d]", ret);
                return ret;
        }
 
        if (default_viewer != NULL) {
                ret = notification_launch_default_viewer(default_viewer, priv_id);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to launch (app_control error : %d)", ret);
+                       ERR("Failed to launch (app_control error : %d)", ret);
                        return NOTIFICATION_ERROR_IO_ERROR;
                }
        }
 
        *reply_body = g_variant_new("(i)", priv_id);
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("_update_noti done !!");
+       DBG("Success to update noti");
        return ret;
 }
 
@@ -805,7 +804,7 @@ int notification_load_noti_by_tag(GVariant *parameters, GVariant **reply_body, u
                print_noti(noti);
                *reply_body = notification_ipc_make_gvariant_from_noti(noti, true);
                if (*reply_body == NULL) {
-                       ERR("cannot make reply_body");
+                       ERR("Failed to make reply_body");
                        ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                }
        } else {
@@ -816,7 +815,6 @@ out:
        if (noti)
                notification_free(noti);
 
-       DBG("_load_noti_by_tag done !!");
        return ret;
 }
 
@@ -843,7 +841,7 @@ int notification_load_noti_by_priv_id(GVariant *parameters, GVariant **reply_bod
 
                *reply_body = notification_ipc_make_gvariant_from_noti(noti, true);
                if (*reply_body == NULL) {
-                       ERR("cannot make reply_body");
+                       ERR("Failed to make reply_body");
                        ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                }
        } else {
@@ -854,7 +852,6 @@ out:
        if (noti)
                notification_free(noti);
 
-       DBG("notification_load_noti_by_priv_id done [%d]", ret);
        return ret;
 }
 
@@ -875,7 +872,6 @@ int notification_load_grouping_list(GVariant *parameters, GVariant **reply_body,
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
-       DBG("load grouping list type : %d, count : %d ", type, count);
 
        ret = notification_noti_get_grouping_list(type, count, &get_list, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
@@ -900,11 +896,11 @@ int notification_load_grouping_list(GVariant *parameters, GVariant **reply_body,
        g_variant_builder_unref(builder);
 
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("load grouping list done !!");
+       INFO("load type[%d], count[%d] ", type, count);
        return ret;
 }
 
@@ -934,7 +930,6 @@ int notification_get_setting_array(GVariant *parameters, GVariant **reply_body,
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
 
-       DBG("get setting array : %d", count);
        builder = g_variant_builder_new(G_VARIANT_TYPE("a(v)"));
 
        if (setting_array) {
@@ -954,9 +949,11 @@ int notification_get_setting_array(GVariant *parameters, GVariant **reply_body,
        g_variant_builder_unref(builder);
 
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
+
+       INFO("count[%d]", count);
        return ret;
 }
 
@@ -973,19 +970,19 @@ static bool __init_setting_handle_by_app_id(const char *app_id, notification_set
 
        ret_pkgmgr = pkgmgrinfo_appinfo_get_appinfo(app_id, &handle);
        if (ret_pkgmgr != PMINFO_R_OK) {
-               ERR("failed to pkgmgrinfo_appinfo_get_appinfo [%s][%d]", app_id, ret);
+               ERR("Failed to pkgmgrinfo_appinfo_get_appinfo [%s][%d]", app_id, ret);
                goto out;
        }
 
        ret_pkgmgr = pkgmgrinfo_appinfo_get_pkgname(handle, &pkgname);
        if (ret_pkgmgr != PMINFO_R_OK) {
-               ERR("failed to pkgmgrinfo_appinfo_get_pkgname [%s][%d]", app_id, ret);
+               ERR("Failed to pkgmgrinfo_appinfo_get_pkgname [%s][%d]", app_id, ret);
                goto out;
        }
 
        ret_setting = (struct notification_setting *)malloc(sizeof(struct notification_setting));
        if (ret_setting == NULL) {
-               ERR("failed to alloc memory");
+               ERR("Failed to alloc memory");
                goto out;
        }
 
@@ -1022,7 +1019,6 @@ int notification_get_setting_by_app_id(GVariant *parameters, GVariant **reply_bo
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
-       DBG("get setting by app_id : %s uid : %d", app_id, param_uid);
 
        ret = noti_setting_service_get_setting_by_app_id(app_id, &setting, param_uid);
        if (ret == NOTIFICATION_ERROR_NOT_EXIST_ID) {
@@ -1037,16 +1033,17 @@ int notification_get_setting_by_app_id(GVariant *parameters, GVariant **reply_bo
        body = notification_ipc_make_gvariant_from_setting(setting);
        notification_setting_free_notification(setting);
        if (body == NULL) {
-               ERR("fail to make gvariant");
+               ERR("Failed to make gvariant");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
        *reply_body = g_variant_new("(v)", body);
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
+       INFO("app_id[%s] uid[%d]", app_id, param_uid);
        return ret;
 }
 
@@ -1069,7 +1066,7 @@ int notification_load_system_setting(GVariant *parameters, GVariant **reply_body
                notification_system_setting_free_system_setting(setting);
 
                if (body == NULL) {
-                       ERR("fail to make gvariant");
+                       ERR("Failed to make gvariant");
                        return NOTIFICATION_ERROR_OUT_OF_MEMORY;
                }
        } else {
@@ -1078,10 +1075,10 @@ int notification_load_system_setting(GVariant *parameters, GVariant **reply_body
 
        *reply_body = g_variant_new("(v)", body);
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
-       DBG("load system setting done !!");
+
        return ret;
 }
 
@@ -1104,8 +1101,6 @@ int notification_load_detail_list(GVariant *parameters, GVariant **reply_body, u
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
-       DBG("load detail list app_id : %s, group_id : %d, priv_id : %d, count : %d ",
-                       app_id, group_id, priv_id, count);
 
        ret = notification_noti_get_detail_list(app_id, group_id, priv_id,
                        count, &get_list, param_uid);
@@ -1132,11 +1127,12 @@ int notification_load_detail_list(GVariant *parameters, GVariant **reply_body, u
        g_variant_builder_unref(builder);
 
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("load detail list done !!");
+       DBG("app_id[%s], group_id[%d], priv_id[%d], count[%d]",
+                       app_id, group_id, priv_id, count);
        return ret;
 }
 
@@ -1153,17 +1149,16 @@ int notification_refresh_noti(GVariant *parameters, GVariant **reply_body, uid_t
 
        ret = send_notify(parameters, "refresh_noti_notify", &_monitoring_hash, PROVIDER_NOTI_INTERFACE_NAME, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to send notify:%d\n", ret);
+               ERR("Failed to send notify [%d]", ret);
                return ret;
        }
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("_refresh_noti_service done !!");
        return ret;
 }
 
@@ -1184,7 +1179,7 @@ static int __delete_sender_info(int priv_id)
                        ret = send_event_notify_by_busname(body, "delete_noti", info->busname, PROVIDER_NOTI_EVENT_INTERFACE_NAME);
                        g_variant_unref(body);
                        if (ret != NOTIFICATION_ERROR_NONE) {
-                               ERR("failed to send event notify:%d\n", ret);
+                               ERR("Failed to send event notify [%d]", ret);
                                return ret;
                        }
                        __event_list = g_list_remove(g_list_first(__event_list), info);
@@ -1213,22 +1208,22 @@ int notification_del_noti_single(GVariant *parameters, GVariant **reply_body, ui
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
        ret = notification_noti_delete_by_priv_id_get_changes(app_id, priv_id, &num_changes, param_uid);
-       DBG("priv_id: [%d] num_delete:%d\n", priv_id, num_changes);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to delete a notification:%d %d\n", ret, num_changes);
+               ERR("Failed to delete a notification, err[%d] num_changes[%d]",
+                       ret, num_changes);
                return ret;
        }
 
        if (num_changes > 0) {
                body = g_variant_new("(iii)", 1, priv_id, param_uid);
                if (body == NULL) {
-                       ERR("cannot make gvariant to noti");
+                       ERR("Failed to make gvariant to noti");
                        return NOTIFICATION_ERROR_OUT_OF_MEMORY;
                }
                ret = send_notify(body, "delete_single_notify", &_monitoring_hash, PROVIDER_NOTI_INTERFACE_NAME, param_uid);
                g_variant_unref(body);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to send notify:%d\n", ret);
+                       ERR("Failed to send notify [%d]", ret);
                        return ret;
                }
 
@@ -1241,10 +1236,11 @@ int notification_del_noti_single(GVariant *parameters, GVariant **reply_body, ui
 
        *reply_body = g_variant_new("(i)", priv_id);
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
-       DBG("_del_noti_single done !!");
+
+       DBG("app_id[%s] priv_id[%d] num_changes[%d]", app_id, priv_id, num_changes);
        return ret;
 }
 
@@ -1262,17 +1258,14 @@ int notification_del_noti_multiple(GVariant *parameters, GVariant **reply_body,
        uid_t param_uid;
 
        g_variant_get(parameters, "(&sii)", &app_id, &type, &param_uid);
-       DBG("app_id: [%s] type: [%d]\n", app_id, type);
+       DBG("app_id [%s] type [%d]", app_id, type);
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
 
        ret = notification_noti_delete_all(type, app_id, &num_deleted, &list_deleted, param_uid);
-
-       DBG("ret: [%d] num_deleted: [%d]\n", ret, num_deleted);
-
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to delete notifications:%d\n", ret);
+               ERR("Failed to delete notifications [%d]", ret);
                if (list_deleted != NULL)
                        free(list_deleted);
                return ret;
@@ -1289,7 +1282,7 @@ int notification_del_noti_multiple(GVariant *parameters, GVariant **reply_body,
                g_variant_builder_unref(builder);
                g_variant_unref(deleted_noti_list);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to send notify:%d\n", ret);
+                       ERR("Failed to send notify [%d]", ret);
                        return ret;
                }
 
@@ -1305,11 +1298,11 @@ int notification_del_noti_multiple(GVariant *parameters, GVariant **reply_body,
 
        *reply_body = g_variant_new("(i)", num_deleted);
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("_del_noti_multiple done !!");
+       INFO("type[%d] app_id[%s] num_deleted[%d]", type, app_id, num_deleted);
        return ret;
 }
 
@@ -1327,23 +1320,25 @@ int notification_get_noti_count(GVariant *parameters, GVariant **reply_body, uid
        g_variant_get(parameters, "(i&siii)", &type, &app_id, &group_id, &priv_id, &param_uid);
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("_validate_uid fail ret : %d", ret);
+               ERR("Failed to validate uid [%d]", ret);
                return NOTIFICATION_ERROR_IO_ERROR;
        }
 
        ret = notification_noti_get_count(type, app_id, group_id, priv_id,
                        &noti_count, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to get count : %d\n", ret);
+               ERR("Failed to get count [%d]", ret);
                return ret;
        }
 
        *reply_body = g_variant_new("(i)", noti_count);
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
-       DBG("_get_noti_property_service done !! %d", ret);
+
+       INFO("type[%d] app_id[%s] group_id[%d] priv_id[%d] noti_count[%d]",
+               type, app_id, group_id, priv_id, noti_count);
        return ret;
 }
 
@@ -1379,22 +1374,21 @@ int notification_update_noti_setting(GVariant *parameters, GVariant **reply_body
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
 
-       DBG("package_name: [%s] app_id: [%s] allow_to_notify: [%d] do_not_disturb_except: [%d] visivility_class: [%d] pop_up_notification: [%d] lock_screen_content_level: [%d]\n",
-                       pkgname, app_id, allow_to_notify, do_not_disturb_except, visivility_class, pop_up_notification, lock_screen_content_level);
-
        ret = notification_setting_db_update(pkgname, app_id, allow_to_notify, do_not_disturb_except, visivility_class,
                                             pop_up_notification, lock_screen_content_level, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to setting db update : %d\n", ret);
+               ERR("Failed to setting db update : %d", ret);
                return ret;
        }
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
-       DBG("_update_noti_setting_service done !! %d", ret);
+
+       INFO("package_name[%s] app_id[%s] allow_to_notify[%d] do_not_disturb_except[%d] visivility_class[%d] pop_up_notification[%d] lock_screen_content_level[%d]",
+                       pkgname, app_id, allow_to_notify, do_not_disturb_except, visivility_class, pop_up_notification, lock_screen_content_level);
        return ret;
 }
 
@@ -1443,11 +1437,11 @@ static int _dnd_schedule_alarm_cb(alarm_id_t alarm_id, void *data)
        ret = send_notify(body, "change_dnd_notify", &_monitoring_hash, PROVIDER_NOTI_INTERFACE_NAME, uid);
        g_variant_unref(body);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to send notify:%d\n", ret);
+               ERR("Failed to send notify [%d]", ret);
                return ret;
        }
 
-       DBG("_dnd_schedule_alarm_cb done");
+       INFO("dnd[%d], uid[%d]", do_not_disturb, uid);
        return ret;
 }
 
@@ -1456,7 +1450,7 @@ static int _get_current_time(struct tm *date)
        time_t now;
 
        if (date == NULL) {
-               ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+               ERR("Invalid tm data");
                return NOTIFICATION_ERROR_INVALID_PARAMETER;
        }
 
@@ -1488,7 +1482,7 @@ static int _noti_system_setting_set_alarm(int week_flag, int hour, int min, alar
 
        err = _get_current_time(&struct_time);
        if (err != NOTIFICATION_ERROR_NONE) {
-               ERR("get_current_time failed");
+               ERR("get_current_time failed [%d]", err);
                goto out;
        }
 
@@ -1507,7 +1501,7 @@ static int _noti_system_setting_set_alarm(int week_flag, int hour, int min, alar
 
        err = alarmmgr_set_time(alarm_info, alarm_time);
        if (err != ALARMMGR_RESULT_SUCCESS) {
-               ERR("alarmmgr_set_time failed (%d)", err);
+               ERR("alarmmgr_set_time failed [%d]", err);
                goto out;
        }
 
@@ -1533,12 +1527,11 @@ static int _noti_system_setting_set_alarm(int week_flag, int hour, int min, alar
 
        *dnd_schedule_alarm_id = alarm_id;
 
-       DBG("alarm_id [%d]", *dnd_schedule_alarm_id);
-
 out:
        if (alarm_info)
                alarmmgr_free_alarm(alarm_info);
 
+       DBG("alarm_id [%d]", *dnd_schedule_alarm_id);
        return err;
 }
 
@@ -1561,7 +1554,7 @@ static dnd_alarm_id_s *__malloc_dnd_alarm_id_s(uid_t uid, alarm_id_t start_alarm
 
        dnd_id_data = (dnd_alarm_id_s *)malloc(sizeof(dnd_alarm_id_s));
        if (dnd_id_data == NULL) {
-               ERR("memory allocation fail");
+               ERR("Failed to alloc memory");
                return NULL;
        }
 
@@ -1585,7 +1578,7 @@ static int _add_alarm(int dnd_schedule_day, int dnd_start_hour, int dnd_start_mi
                                _dnd_schedule_alarm_cb,
                                &dnd_schedule_start_alarm_id);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("_add_alarm fail %d", ret);
+               ERR("Failed to set start alarm [%d]", ret);
                return ret;
        }
 
@@ -1602,7 +1595,7 @@ static int _add_alarm(int dnd_schedule_day, int dnd_start_hour, int dnd_start_mi
                                _dnd_schedule_alarm_cb,
                                &dnd_schedule_end_alarm_id);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("_add_alarm fail %d", ret);
+               ERR("Failed to set end alarm [%d]", ret);
                return ret;
        }
 
@@ -1694,12 +1687,9 @@ int notification_update_noti_sys_setting(GVariant *parameters, GVariant **reply_
        if (ret != NOTIFICATION_ERROR_NONE)
                return ret;
 
-       DBG("do_not_disturb [%d] visivility_class [%d] set_schedule [%d] lock_screen_level [%d]\n",
-                       do_not_disturb, visivility_class, dnd_schedule_enabled, lock_screen_level);
-
        ret = noti_system_setting_get_do_not_disturb(&pre_do_not_disturb, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to get do not disturb");
+               ERR("Failed to get do not disturb");
                return ret;
        }
 
@@ -1714,7 +1704,7 @@ int notification_update_noti_sys_setting(GVariant *parameters, GVariant **reply_
                                lock_screen_level,
                                param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to setting db update system setting : %d\n", ret);
+               ERR("Failed to setting db update system setting : %d", ret);
                return ret;
        }
 
@@ -1726,7 +1716,7 @@ int notification_update_noti_sys_setting(GVariant *parameters, GVariant **reply_
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
@@ -1734,13 +1724,13 @@ int notification_update_noti_sys_setting(GVariant *parameters, GVariant **reply_
                ret = _add_alarm(dnd_schedule_day, dnd_start_hour, dnd_start_min,
                                dnd_end_hour, dnd_end_min, param_uid);
                if (ret != NOTIFICATION_ERROR_NONE)
-                       ERR("failed to add alarm for dnd_schedule");
+                       ERR("Failed to add alarm for dnd_schedule");
        } else {
                _delete_alarm(param_uid);
        }
 
-       DBG("_update_noti_sys_setting_service done !! %d", ret);
-
+       INFO("do_not_disturb [%d] visivility_class [%d] set_schedule [%d] lock_screen_level [%d]",
+                       do_not_disturb, visivility_class, dnd_schedule_enabled, lock_screen_level);
        return ret;
 }
 
@@ -1762,20 +1752,20 @@ int notification_add_noti_template(GVariant *parameters, GVariant **reply_body,
                g_variant_unref(coupled_body);
                g_variant_unref(body);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to make a notification:%d\n", ret);
+                       ERR("Failed to make a notification [%d]", ret);
                        goto out;
                }
 
                ret = notification_noti_check_count_for_template(noti, &count);
                if (count >= NOTI_TEMPLATE_LIMIT) {
-                       ERR("Exceed limit value that is saved tamplate :%d\n", ret);
+                       ERR("Exceed limit value that is saved tamplate  [%d]", ret);
                        ret = NOTIFICATION_ERROR_MAX_EXCEEDED;
                        goto out;
                }
 
                ret = notification_noti_add_template(noti, template_name);
                if (ret != NOTIFICATION_ERROR_NONE)
-                       ERR("failed to add a notification:%d\n", ret);
+                       ERR("Failed to add a notification [%d]", ret);
        } else {
                ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
@@ -1784,7 +1774,6 @@ out:
        if (noti)
                notification_free(noti);
 
-       DBG("notification_add_noti_template is done [%d]", ret);
        return ret;
 }
 
@@ -1798,23 +1787,24 @@ int notification_get_noti_template(GVariant *parameters, GVariant **reply_body,
        noti = notification_create(NOTIFICATION_TYPE_NOTI);
        if (noti != NULL) {
                g_variant_get(parameters, "(&s)", &template_name);
+               INFO("template name[%s]", template_name);
 
                ret = aul_app_get_appid_bypid_for_uid(pid, app_id, sizeof(app_id), uid);
                if (ret != AUL_R_OK) {
-                       ERR("failed to get app_id:%d", ret);
+                       ERR("Failed to get app_id [%d]", ret);
                        ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
                        goto out;
                }
 
                ret = notification_noti_get_package_template(noti, app_id, template_name);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       DBG("failed to get template:%d", ret);
+                       ERR("Failed to get template [%d]", ret);
                        goto out;
                }
 
                *reply_body = notification_ipc_make_gvariant_from_noti(noti, false);
                if (*reply_body == NULL) {
-                       ERR("cannot make reply_body");
+                       ERR("Failed to make reply_body");
                        ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                }
        } else {
@@ -1825,7 +1815,6 @@ out:
        if (noti)
                notification_free(noti);
 
-       DBG("notification_get_noti_template is done [%d]", ret);
        return ret;
 }
 
@@ -1839,16 +1828,16 @@ int notification_get_noti_package_template(GVariant *parameters, GVariant **repl
        noti = notification_create(NOTIFICATION_TYPE_NOTI);
        if (noti != NULL) {
                g_variant_get(parameters, "(&s&s)", &app_id, &template_name);
-
+               INFO("app_id[%s] template name[%s]", app_id, template_name);
                ret = notification_noti_get_package_template(noti, app_id, template_name);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to get template:%d", ret);
+                       ERR("Failed to get template [%d]", ret);
                        goto out;
                }
 
                *reply_body = notification_ipc_make_gvariant_from_noti(noti, false);
                if (*reply_body == NULL) {
-                       ERR("cannot make reply_body");
+                       ERR("Failed to make reply_body");
                        ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                }
        } else {
@@ -1859,7 +1848,6 @@ out:
        if (noti)
                notification_free(noti);
 
-       DBG("notification_get_noti_package_template is done [%d]", ret);
        return ret;
 }
 
@@ -1877,7 +1865,7 @@ int notification_get_block_state(GVariant *parameters, GVariant **reply_body, ui
 
        ret = _validate_and_set_param_uid_with_uid(uid, &param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("_validate_uid fail ret : %d", ret);
+               ERR("_validate_uid fail [%d]", ret);
                return NOTIFICATION_ERROR_IO_ERROR;
        }
 
@@ -1887,8 +1875,10 @@ int notification_get_block_state(GVariant *parameters, GVariant **reply_body, ui
        }
 
        ret = notification_get_dnd_and_allow_to_notify(app_id, &dnd, &dnd_except, &allow_to_notify, param_uid);
+       INFO("app_id[%s] dnd[%d] dnd_except[%d] allow_to_notify[%d]",
+               app_id, dnd, dnd_except, allow_to_notify);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to get_dnd_and_allow_to_notify : %d\n", ret);
+               ERR("Failed to get_dnd_and_allow_to_notify [%d]", ret);
                return ret;
        }
 
@@ -1896,11 +1886,10 @@ int notification_get_block_state(GVariant *parameters, GVariant **reply_body, ui
        *reply_body = g_variant_new("(v)", body);
 
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("get notification block state done");
        return ret;
 }
 int notification_load_dnd_allow_exception(GVariant *parameters, GVariant **reply_body, uid_t uid)
@@ -1922,7 +1911,7 @@ int notification_load_dnd_allow_exception(GVariant *parameters, GVariant **reply
 
        ret = notification_system_setting_load_dnd_allow_exception(&dnd_allow_exception, &count, param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to load dnd_allow_exception : %d", ret);
+               ERR("Failed to load dnd_allow_exception [%d]", ret);
                return ret;
        }
 
@@ -1941,11 +1930,10 @@ int notification_load_dnd_allow_exception(GVariant *parameters, GVariant **reply
        g_variant_builder_unref(builder);
 
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("load dnd_allow_exception");
        return ret;
 }
 
@@ -1966,17 +1954,16 @@ int notification_update_dnd_allow_exception(GVariant *parameters, GVariant **rep
                        value,
                        param_uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to update dnd_allow_exception : %d", ret);
+               ERR("Failed to update dnd_allow_exception [%d]", ret);
                return ret;
        }
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply_body");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("update dnd_allow_exception");
        return ret;
 }
 
@@ -2020,7 +2007,7 @@ int notification_send_noti_event(GVariant *parameters, GVariant **reply_body)
                g_variant_unref(body);
 
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to make a notification from gvariant");
+                       ERR("Failed to make a notification from gvariant");
                        goto out;
                }
 
@@ -2047,13 +2034,13 @@ int notification_send_noti_event(GVariant *parameters, GVariant **reply_body)
 
                ret = send_event_notify_by_busname(parameters, "send_event", info->busname, PROVIDER_NOTI_EVENT_INTERFACE_NAME);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to send event");
+                       ERR("Failed to send event [%d]", ret);
                        goto out;
                }
 
                *reply_body = g_variant_new("()");
                if (*reply_body == NULL) {
-                       ERR("cannot make reply body");
+                       ERR("Failed to make reply body");
                        ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                }
        } else {
@@ -2064,7 +2051,6 @@ out:
        if (noti)
                notification_free(noti);
 
-       DBG("notification_send_noti_event is done [%d]", ret);
        return ret;
 }
 
@@ -2084,7 +2070,7 @@ int notification_send_noti_event_by_priv_id(GVariant *parameters, GVariant **rep
 
                ret = notification_noti_get_by_priv_id(noti, priv_id);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to get notification by priv id [%d]", ret);
+                       ERR("Failed to get notification by priv id [%d]", ret);
                        goto out;
                }
 
@@ -2097,6 +2083,7 @@ int notification_send_noti_event_by_priv_id(GVariant *parameters, GVariant **rep
                info = __find_sender_info_by_priv_id(priv_id);
                if (info == NULL || info->busname == NULL) {
                        ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
+                       ERR("No sender info by priv_id[%d]", priv_id);
                        goto out;
                }
 
@@ -2121,7 +2108,7 @@ int notification_send_noti_event_by_priv_id(GVariant *parameters, GVariant **rep
                ret = send_event_notify_by_busname(g_variant_new("(vi)", body, event_type), "send_event", info->busname, PROVIDER_NOTI_EVENT_INTERFACE_NAME);
                *reply_body = g_variant_new("()");
                if (*reply_body == NULL) {
-                       ERR("cannot make reply body");
+                       ERR("Failed to make reply body");
                        ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
                }
        } else {
@@ -2132,7 +2119,6 @@ out:
        if (noti)
                notification_free(noti);
 
-       DBG("notification_send_noti_event_by_priv_id done [%d]", ret);
        return ret;
 }
 
@@ -2144,7 +2130,7 @@ int notification_check_event_receiver(GVariant *parameters, GVariant **reply_bod
        event_sender_info_s *info = NULL;
 
        g_variant_get(parameters, "(i)", &priv_id);
-       DBG("check event sender - priv_id : %d", priv_id);
+       INFO("priv_id[%d]", priv_id);
 
        __event_list = g_list_first(__event_list);
        find_list = g_list_find_custom(__event_list, GINT_TO_POINTER(priv_id),
@@ -2166,11 +2152,11 @@ int notification_check_event_receiver(GVariant *parameters, GVariant **reply_bod
 
        *reply_body = g_variant_new("(i)", (int)available);
        if (*reply_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make gvariant to noti");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("notification check event receiver - available[%d]", available);
+       INFO("Receiver available[%d]", available);
        return NOTIFICATION_ERROR_NONE;
 }
 
@@ -2179,13 +2165,13 @@ int notification_reset_event_receiver(GVariant *parameters, GVariant **reply_bod
        int priv_id;
 
        g_variant_get(parameters, "(i)", &priv_id);
-       DBG("reset event sender - priv_id : %d", priv_id);
+       INFO("priv_id[%d]", priv_id);
 
        __add_sender_info(priv_id, sender);
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("cannot make gvariant to noti");
+               ERR("Failed to make gvariant to noti");
                return NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }
 
@@ -2203,7 +2189,7 @@ HAPI int notification_delete_noti_by_app_id(const char *app_id, uid_t uid)
 
        ret = notification_noti_delete_all(NOTIFICATION_TYPE_NONE, app_id, &num_deleted, &list_deleted, uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("failed to delete notifications:%d\n", ret);
+               ERR("Failed to delete notifications [%d]", ret);
                goto out;
        }
 
@@ -2218,7 +2204,7 @@ HAPI int notification_delete_noti_by_app_id(const char *app_id, uid_t uid)
                g_variant_builder_unref(builder);
                g_variant_unref(deleted_noti_list);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("failed to send notify:%d\n", ret);
+                       ERR("Failed to send notify [%d]", ret);
                        goto out;
                }
 
@@ -2280,14 +2266,14 @@ static int _check_dnd_schedule(uid_t uid)
 
        ret = noti_system_setting_load_system_setting(&setting, uid);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("noti_system_setting_load_system_setting fail %d", ret);
+               ERR("noti_system_setting_load_system_setting fail [%d]", ret);
                return ret;
        }
 
        ret = notification_system_setting_dnd_schedule_get_enabled(setting,
                                &dnd_schedule_enabled);
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("system_setting_dnd_schedule_get_enabled fail %d", ret);
+               ERR("system_setting_dnd_schedule_get_enabled fail [%d]", ret);
                goto out;
        }
 
@@ -2295,21 +2281,21 @@ static int _check_dnd_schedule(uid_t uid)
                ret = notification_system_setting_dnd_schedule_get_day(setting,
                                &dnd_schedule_day);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("system_setting_dnd_schedule_get_day fail %d", ret);
+                       ERR("system_setting_dnd_schedule_get_day fail [%d]", ret);
                        goto out;
                }
 
                ret = notification_system_setting_dnd_schedule_get_start_time(setting,
                                &dnd_start_hour, &dnd_start_min);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("system_setting_dnd_schedule_get_start_time fail %d", ret);
+                       ERR("system_setting_dnd_schedule_get_start_time fail [%d]", ret);
                        goto out;
                }
 
                ret = notification_system_setting_dnd_schedule_get_end_time(setting,
                                &dnd_end_hour, &dnd_end_min);
                if (ret != NOTIFICATION_ERROR_NONE) {
-                       ERR("system_setting_dnd_schedule_get_end_time fail %d", ret);
+                       ERR("system_setting_dnd_schedule_get_end_time fail [%d]", ret);
                        goto out;
                }
 
@@ -2337,13 +2323,13 @@ HAPI int notification_service_init(void)
        _monitoring_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
        ret = notification_db_init();
        if (ret != NOTIFICATION_ERROR_NONE) {
-               ERR("notification db init fail %d", ret);
+               ERR("Failed to init DB [%d]", ret);
                return ret;
        }
 
        ret = notification_register_dbus_interface();
        if (ret != SERVICE_COMMON_ERROR_NONE) {
-               ERR("notification register dbus fail %d", ret);
+               ERR("Failed to register dbus interface [%d]", ret);
                return NOTIFICATION_ERROR_IO_ERROR;
        }
 
@@ -2360,14 +2346,14 @@ HAPI int notification_service_init(void)
        if (uids)
                free(uids);
 
-       DBG("Successfully initialized\n");
+       DBG("Successfully initialized");
        return NOTIFICATION_ERROR_NONE;
 }
 
 HAPI int notification_service_fini(void)
 {
        pkgmgr_fini();
-       DBG("Successfully Finalized\n");
+       DBG("Successfully Finalized");
        return NOTIFICATION_ERROR_NONE;
 }
 
index eed393c..4f875ff 100755 (executable)
@@ -168,7 +168,7 @@ static inline void invoke_callback(uid_t uid, const char *pkgname, struct item *
                invoke_app_disable_event_handler(uid, pkgname, item->status, value);
                break;
        default:
-               ERR("Unknown type: %d\n", item->type);
+               ERR("Unknown type: %d", item->type);
                break;
        }
 }
@@ -212,7 +212,7 @@ static struct item *find_item(const char *pkgname, uid_t uid)
        struct item *item;
 
        if (!pkgname) {
-               ERR("Package name is not valid\n");
+               ERR("Invalid pkgname");
                return NULL;
        }
 
@@ -223,7 +223,7 @@ static struct item *find_item(const char *pkgname, uid_t uid)
                return item;
        }
 
-       DBG("Package %s is not found\n", pkgname);
+       DBG("Package [%s] is not found", pkgname);
        return NULL;
 }
 
@@ -231,17 +231,17 @@ static int start_cb(uid_t uid, const char *pkgname, const char *val, void *data)
 {
        struct item *item;
 
-       DBG("[%s] %s\n", pkgname, val);
+       INFO("pkgname[%s] val[%s]", pkgname, val);
 
        item = calloc(1, sizeof(*item));
        if (!item) {
-               ERR("calloc: %d\n", errno);
+               ERR("calloc [%d]", errno);
                return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
        }
 
        item->pkgname = strdup(pkgname);
        if (!item->pkgname) {
-               ERR("strdup: %d\n", errno);
+               ERR("strdup [%d]", errno);
                free(item);
                return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
        }
@@ -266,7 +266,7 @@ static int start_cb(uid_t uid, const char *pkgname, const char *val, void *data)
        } else {
                free(item->pkgname);
                free(item);
-               ERR("Invalid val: %s\n", val);
+               ERR("Invalid val [%s]", val);
                return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
        }
        s_info.item_list = eina_list_append(s_info.item_list, item);
@@ -279,7 +279,7 @@ static int icon_path_cb(uid_t uid, const char *pkgname, const char *val, void *d
 {
        struct item *item;
 
-       DBG("[%s] %s\n", pkgname, val);
+       DBG("pkgname[%s] val[%s]", pkgname, val);
 
        item = find_item(pkgname, uid);
        if (!item)
@@ -290,7 +290,7 @@ static int icon_path_cb(uid_t uid, const char *pkgname, const char *val, void *d
 
        item->icon = strdup(val);
        if (!item->icon) {
-               ERR("strdup: %d\n", errno);
+               ERR("strdup [%d]", errno);
                return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
        }
 
@@ -301,14 +301,14 @@ static int command_cb(uid_t uid, const char *pkgname, const char *val, void *dat
 {
        struct item *item;
 
-       DBG("[%s] %s\n", pkgname, val);
+       DBG("pkgname[%s] val[%s]", pkgname, val);
 
        item = find_item(pkgname, uid);
        if (!item)
                return SERVICE_COMMON_ERROR_NOT_EXIST;
 
        if (!is_valid_status(item, val)) {
-               DBG("Invalid status: %d, %s\n", item->type, val);
+               DBG("Invalid status[%d] val[%s]", item->type, val);
                return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
        }
 
@@ -322,7 +322,7 @@ static int error_cb(uid_t uid, const char *pkgname, const char *val, void *data)
        /* val = error */
        struct item *item;
 
-       DBG("[%s] %s\n", pkgname, val);
+       INFO("pkgname[%s] val[%s]", pkgname, val);
 
        item = find_item(pkgname, uid);
        if (!item)
@@ -338,7 +338,7 @@ static int change_pkgname_cb(uid_t uid, const char *pkgname, const char *val, vo
        struct item *item;
        char *new_pkgname;
 
-       DBG("[%s] %s\n", pkgname, val);
+       INFO("pkgname[%s] val[%s]", pkgname, val);
 
        item = find_item(pkgname, uid);
        if (!item)
@@ -346,7 +346,7 @@ static int change_pkgname_cb(uid_t uid, const char *pkgname, const char *val, vo
 
        new_pkgname = strdup(val);
        if (!new_pkgname) {
-               ERR("strdup: %d\n", errno);
+               ERR("strdup: %d", errno);
                return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
        }
 
@@ -361,16 +361,16 @@ static int download_cb(uid_t uid, const char *pkgname, const char *val, void *da
        struct item *item;
        double value;
 
-       DBG("[%s] %s\n", pkgname, val);
+       INFO("pkgname[%s] val[%s]", pkgname, val);
 
        item = find_item(pkgname, uid);
        if (!item) {
-               DBG("ITEM is not started from the start_cb\n");
+               DBG("ITEM is not started from the start_cb");
                return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
        }
 
        if (item->type != PKGMGR_EVENT_DOWNLOAD) {
-               DBG("TYPE is not \"download\" : %d\n", item->type);
+               DBG("TYPE is not \"download\" [%d]", item->type);
                item->type = PKGMGR_EVENT_DOWNLOAD;
        }
 
@@ -381,7 +381,7 @@ static int download_cb(uid_t uid, const char *pkgname, const char *val, void *da
        case PKGMGR_STATUS_PROCESSING:
                break;
        default:
-               ERR("Invalid state [%s, %s]\n", pkgname, val);
+               ERR("Invalid status, pkgname[%s] val[%s]", pkgname, val);
                return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
        }
 
@@ -402,11 +402,9 @@ static int progress_cb(uid_t uid, const char *pkgname, const char *val, void *da
        struct item *item;
        double value;
 
-       DBG("[%s] %s\n", pkgname, val);
-
        item = find_item(pkgname, uid);
        if (!item) {
-               ERR("ITEM is not started from the start_cb\n");
+               ERR("ITEM is not started from the start_cb");
                return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
        }
 
@@ -417,7 +415,7 @@ static int progress_cb(uid_t uid, const char *pkgname, const char *val, void *da
        case PKGMGR_STATUS_PROCESSING:
                break;
        default:
-               ERR("Invalid state [%s, %s]\n", pkgname, val);
+               ERR("Invalid status, pkgname[%s] val[%s]", pkgname, val);
                return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
        }
 
@@ -436,7 +434,7 @@ static int end_cb(uid_t uid, const char *pkgname, const char *val, void *data)
 {
        struct item *item;
 
-       DBG("[%s] %s\n", pkgname, val);
+       DBG("[%s] %s", pkgname, val);
 
        item = find_item(pkgname, uid);
        if (!item)
@@ -481,7 +479,7 @@ static int status_cb(uid_t target_uid, int req_id, const char *type,
 
                ret = handler[i].func(target_uid, pkgname, val, data);
                if (ret < 0) {
-                       DBG("REQ[%d], UID[%d], pkgname[%s], type[%s], key[%s], val[%s], ret = %d\n",
+                       DBG("REQ[%d] UID[%d] pkgname[%s] type[%s] key[%s] val[%s] ret[%d]",
                                        req_id, target_uid, pkgname, type, key, val, ret);
                }
        }
@@ -502,7 +500,7 @@ static int app_status_cb(uid_t target_uid, int req_id, const char *pkg_type,
 
                ret = handler[i].func(target_uid, appid, val, data);
                if (ret < 0) {
-                       DBG("REQ[%d], UID[%d], appid[%s], type[%s], key[%s], val[%s], ret = %d\n",
+                       DBG("REQ[%d] UID[%d] appid[%s] type[%s] key[%s] val[%s] ret[%d]",
                                        req_id, target_uid, appid, pkg_type, key, val, ret);
                }
        }
@@ -585,7 +583,7 @@ HAPI int pkgmgr_add_event_callback(enum pkgmgr_event_type type, int (*cb)(uid_t
 
        item = calloc(1, sizeof(*item));
        if (!item) {
-               ERR("calloc: %d\n", errno);
+               ERR("calloc [%d]", errno);
                return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
        }
 
@@ -700,7 +698,7 @@ HAPI void *pkgmgr_del_event_callback(enum pkgmgr_event_type type, int (*cb)(uid_
                }
                break;
        default:
-               ERR("Invalid type\n");
+               ERR("Invalid type");
                break;
        }
 
index a37adb3..e8866e7 100755 (executable)
@@ -53,20 +53,14 @@ void print_noti(notification_h noti)
        char *text = NULL;
        char *content = NULL;
        const char *tag = NULL;
-       const char *vibration_path = NULL;
-       notification_vibration_type_e type;
 
        notification_get_pkgname(noti, &pkgname);
        notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
        notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &content);
        notification_get_tag(noti, &tag);
-       notification_get_vibration(noti, &type, &vibration_path);
 
-       DBG("provider print_noti  pkgname  = %s", pkgname);
-       DBG("provider print_noti  title  = %s", text);
-       DBG("provider print_noti  content  = %s", content);
-       DBG("provider print_noti  tag  = %s", tag);
-       DBG("provider print_noti  vibration_path  = %s %d", vibration_path, type);
+       DBG("Noti-info : pkgname[%s] title[%s] content[%s] tag[%s]",
+               pkgname, text, content, tag);
 }
 
 uid_t get_sender_uid(const char *sender_name)
@@ -80,7 +74,7 @@ uid_t get_sender_uid(const char *sender_name)
        msg = g_dbus_message_new_method_call(DBUS_NAME, DBUS_OBJECT_PATH,
                        DBUS_INTERFACE_NAME, "GetConnectionUnixUser");
        if (!msg) {
-               LOGE("Can't allocate new method call");
+               LOGE("Failed to alloc new method call");
                goto out;
        }
 
@@ -119,7 +113,7 @@ pid_t get_sender_pid(const char *sender_name)
        msg = g_dbus_message_new_method_call(DBUS_NAME, DBUS_OBJECT_PATH,
                        DBUS_INTERFACE_NAME, "GetConnectionUnixProcessID");
        if (!msg) {
-               LOGE("Can't allocate new method call");
+               LOGE("Failed to alloc new method call");
                goto out;
        }
 
@@ -158,7 +152,7 @@ bool is_existed_busname(const char *sender_name)
        msg = g_dbus_message_new_method_call(DBUS_NAME, DBUS_OBJECT_PATH,
                        DBUS_INTERFACE_NAME, "NameHasOwner");
        if (!msg) {
-               LOGE("Can't allocate new method call");
+               LOGE("Failed to alloc new method call");
                goto out;
        }
 
@@ -195,8 +189,6 @@ int send_notify(GVariant *body, char *cmd, GHashTable **monitoring_hash, char *i
        int monitoring_count = 0;
        bool is_existed = false;
 
-       DBG("send_notify uid : %d", uid);
-
        monitoring_list = (GList *)g_hash_table_lookup(*monitoring_hash, GUINT_TO_POINTER(uid));
        target_list = g_list_first(monitoring_list);
        for (; target_list != NULL; ) {
@@ -207,7 +199,6 @@ int send_notify(GVariant *body, char *cmd, GHashTable **monitoring_hash, char *i
                if (g_variant_is_floating(body))
                        g_variant_ref(body);
 
-               DBG("emit signal to : %s", target_bus_name);
                if (g_dbus_connection_emit_signal(_gdbus_conn,
                                        target_bus_name,
                                        PROVIDER_OBJECT_PATH,
@@ -215,23 +206,20 @@ int send_notify(GVariant *body, char *cmd, GHashTable **monitoring_hash, char *i
                                        cmd,
                                        body,
                                        &err) == FALSE) {
-
-                       ERR("g_dbus_connection_emit_signal() is failed");
                        if (err != NULL) {
-                               ERR("g_dbus_connection_emit_signal() err : %s",
-                                               err->message);
+                               ERR("Emit signal err [%s]", err->message);
                                g_error_free(err);
                        }
                        is_existed = is_existed_busname(target_bus_name);
                        if (is_existed == false)
                                delete_monitoring_list(monitoring_hash, target_bus_name, uid);
-                       ERR("failed to emit signal: %s", target_bus_name);
+                       ERR("Fail, emit signal to [%s]", target_bus_name);
                }
                monitoring_count++;
-               DBG("signal send done: %s", target_bus_name);
+               DBG("Success, emit signal to [%s]", target_bus_name);
        }
 
-       DBG("provider _send_notify cmd : [%s], monitoring count : [%d] done", cmd, monitoring_count);
+       DBG("Success, cmd[%s] monitoring count[%d]", cmd, monitoring_count);
        return SERVICE_COMMON_ERROR_NONE;
 }
 
@@ -242,7 +230,6 @@ int send_event_notify_by_busname(GVariant *body, char *cmd, char *busname, char
        if (g_variant_is_floating(body))
                g_variant_ref(body);
 
-       DBG("emit signal to : %s", busname);
        if (g_dbus_connection_emit_signal(_gdbus_conn,
                                          busname,
                                          PROVIDER_OBJECT_PATH,
@@ -250,15 +237,15 @@ int send_event_notify_by_busname(GVariant *body, char *cmd, char *busname, char
                                          cmd,
                                          body,
                                          &err) == FALSE) {
-               ERR("g_dbus_connection_emit_signal() is failed");
                if (err != NULL) {
-                       ERR("g_dbus_connection_emit_signal() err : %s",
+                       ERR("Emit signal err [%s]",
                                        err->message);
                        g_error_free(err);
                }
+               ERR("Failed to emit signal to [%s]", busname);
                return SERVICE_COMMON_ERROR_IO_ERROR;
        }
-       DBG("provider signal send event notify done : busname[%s] cmd[%s]", busname, cmd);
+       DBG("Success, Emit signal to [%s] cmd[%s]", busname, cmd);
        return SERVICE_COMMON_ERROR_NONE;
 }
 
@@ -297,7 +284,7 @@ int service_register(GVariant *parameters, GVariant **reply_body, const gchar *s
                DBG("add new sender to list");
                m_info = (monitoring_info_s *)calloc(1, sizeof(monitoring_info_s));
                if (m_info == NULL) {
-                       ERR("Can not alloc monitoring_info_s");
+                       ERR("Failed to alloc memory");
                        return SERVICE_COMMON_ERROR_IO_ERROR;
                }
 
@@ -312,21 +299,21 @@ int service_register(GVariant *parameters, GVariant **reply_body, const gchar *s
                                m_info,
                                NULL);
                if (m_info->watcher_id == 0) {
-                       ERR("fail to watch name");
+                       ERR("Fail to watch name [%d]", bus_name);
                        free(m_info->bus_name);
                        free(m_info);
                        return SERVICE_COMMON_ERROR_IO_ERROR;
                } else {
-                       DBG("watch on %s success", bus_name);
+                       DBG("Watch on [%s] success", bus_name);
                }
 
                monitoring_list = g_list_append(monitoring_list, strdup(bus_name));
-               DBG("service_register : register success sender is %s , length : %d",
+               DBG("Success, sender[%s] length[%d]",
                                sender, g_list_length(monitoring_list));
                if (g_hash_table_lookup(*monitoring_hash, GUINT_TO_POINTER(request_uid)) == NULL)
                        g_hash_table_insert(*monitoring_hash, GUINT_TO_POINTER(request_uid), monitoring_list);
        } else {
-               ERR("service_register : register sender %s already exist", sender);
+               ERR("Sender [%s] already exist", sender);
        }
 
        *reply_body = g_variant_new("()");
@@ -337,7 +324,7 @@ int service_register(GVariant *parameters, GVariant **reply_body, const gchar *s
                        free(m_info);
                }
                monitoring_list = g_list_remove(monitoring_list, bus_name);
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply");
                return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
        }
        return SERVICE_COMMON_ERROR_NONE;
@@ -351,7 +338,7 @@ int delete_monitoring_list(GHashTable **monitoring_hash, const char *sender, uid
 
        monitoring_list = (GList *)g_hash_table_lookup(*monitoring_hash, GUINT_TO_POINTER(uid));
        if (monitoring_list == NULL) {
-               ERR("Failed g_hash_table_lookup uid : %d", uid);
+               ERR("No uid[%d] in monitoring hash", uid);
                return SERVICE_COMMON_ERROR_IO_ERROR;
        }
 
@@ -360,7 +347,7 @@ int delete_monitoring_list(GHashTable **monitoring_hash, const char *sender, uid
                        (GCompareFunc)_monitoring_app_list_compare_cb);
 
        if (del_list) {
-               DBG("Find delete list - uid : %d , sender : %s", uid, sender);
+               DBG("Find delete list - uid[%d] sender[%s]", uid, sender);
                bus_name = g_list_nth_data(del_list, 0);
                if (bus_name)
                        free(bus_name);
@@ -403,7 +390,7 @@ int service_common_register_dbus_interface(char *introspection_xml, GDBusInterfa
 
        result = _dbus_init();
        if (result != SERVICE_COMMON_ERROR_NONE) {
-                       ERR("Can't init dbus %d", result);
+                       ERR("Can't init dbus [%d]", result);
                        result = SERVICE_COMMON_ERROR_IO_ERROR;
                        goto out;
        }
@@ -416,18 +403,18 @@ int service_common_register_dbus_interface(char *introspection_xml, GDBusInterfa
                        NULL,
                        NULL, NULL);
        if (!owner_id) {
-               ERR("g_bus_own_name error");
+               ERR("Failed to own name");
                result = SERVICE_COMMON_ERROR_IO_ERROR;
                goto out;
        }
 
-       DBG("Acquiring the own name : %d", owner_id);
+       DBG("Acquiring the own name [%d]", owner_id);
        introspection_data = g_dbus_node_info_new_for_xml(introspection_xml, &error);
        if (!introspection_data) {
-               ERR("g_dbus_node_info_new_for_xml() is failed.");
+               ERR("g_dbus_node_info_new_for_xml is failed.");
                result = SERVICE_COMMON_ERROR_IO_ERROR;
                if (error != NULL) {
-                       ERR("g_dbus_node_info_new_for_xml error [%s]", error->message);
+                       ERR("g_dbus_node_info_new_for_xml err [%s]", error->message);
                        g_error_free(error);
                }
                goto out;
@@ -437,7 +424,7 @@ int service_common_register_dbus_interface(char *introspection_xml, GDBusInterfa
                        PROVIDER_OBJECT_PATH, introspection_data->interfaces[0],
                        &interface_vtable, NULL, NULL, NULL);
 
-       DBG("noti_registration_id %d", noti_registration_id);
+       DBG("registration id[%d]", noti_registration_id);
        if (noti_registration_id == 0) {
                ERR("Failed to g_dbus_connection_register_object");
                result = SERVICE_COMMON_ERROR_IO_ERROR;
index 067bf0f..d94c9b3 100755 (executable)
@@ -33,17 +33,17 @@ static void _on_name_appeared(GDBusConnection *connection,
                const gchar     *name_owner,
                gpointer         user_data)
 {
-       DBG("name appeared : %s", name);
+       DBG("name [%s]", name);
 }
 
 static void _on_name_vanished(GDBusConnection *connection,
                const gchar     *name,
                gpointer         user_data)
 {
-       DBG("name vanished : %s", name);
+       DBG("name [%s]", name);
        monitoring_info_s *info = (monitoring_info_s *)user_data;
        if (info) {
-               DBG("name vanished uid : %d", info->uid);
+               DBG("vanished uid [%d]", info->uid);
                g_bus_unwatch_name(info->watcher_id);
                delete_monitoring_list(&_monitoring_hash, name, info->uid);
 
@@ -60,7 +60,7 @@ static void _shortcut_dbus_method_call_handler(GDBusConnection *conn,
                gpointer user_data)
 {
        /* TODO : sender authority(privilege) check */
-       DBG("shortcut method_name: %s", method_name);
+       DBG("shortcut method_name [%s]", method_name);
        GVariant *reply_body = NULL;
        int ret = SHORTCUT_ERROR_NOT_SUPPORTED;
        uid_t uid = get_sender_uid(sender);
@@ -86,11 +86,12 @@ static void _shortcut_dbus_method_call_handler(GDBusConnection *conn,
        }
 
        if (ret == SERVICE_COMMON_ERROR_NONE) {
-               DBG("shortcut service success : %d", ret);
+               DBG("shortcut service success, method[%s]", method_name);
                g_dbus_method_invocation_return_value(
                                invocation, reply_body);
        } else {
-               DBG("shortcut service fail : %d", ret);
+               DBG("shortcut service fail, method_name[%s] err[%d]",
+                       method_name, ret);
                g_dbus_method_invocation_return_error(
                                invocation,
                                SHORTCUT_ERROR,
@@ -204,7 +205,6 @@ int shortcut_get_shortcut_service_list(GVariant *parameters, GVariant **reply_bo
        g_variant_dict_end(&dict);
 
        count = shortcut_db_get_list(package_name, &shortcut_list);
-       DBG("shortcut count : %d", count);
        builder = g_variant_builder_new(G_VARIANT_TYPE("a(v)"));
        if (count > 0) {
                iter_list = g_list_first(shortcut_list);
@@ -221,11 +221,11 @@ int shortcut_get_shortcut_service_list(GVariant *parameters, GVariant **reply_bo
        g_variant_builder_unref(builder);
 
        if (*reply_body == NULL) {
-               ERR("cannot make reply_body");
+               ERR("Failed to make reply");
                return SHORTCUT_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("shortcut_get_shortcut_service_list done !!");
+       INFO("count[%d]", count);
        return SERVICE_COMMON_ERROR_NONE;
 }
 
@@ -253,7 +253,7 @@ static void _add_invocation(GDBusMethodInvocation *invocation, char *request_id)
 
        g_hash_table_insert(_invocation_hash, strdup(request_id), invocation);
 
-       DBG("add invocation is done, key [%s]", request_id);
+       DBG("Invocation key [%s]", request_id);
 }
 
 static void _remove_invocation(char *request_id)
@@ -263,7 +263,7 @@ static void _remove_invocation(char *request_id)
 
        g_hash_table_remove(_invocation_hash, request_id);
 
-       DBG("remove invocation is done, key [%s]", request_id);
+       DBG("Invocation key [%s]", request_id);
 }
 
 /* add_shortcut */
@@ -278,9 +278,10 @@ void shortcut_add(GVariant *parameters, GDBusMethodInvocation *invocation,  uid_
 
        ret = send_notify(parameters, "add_shortcut_notify", &_monitoring_hash, PROVIDER_SHORTCUT_INTERFACE_NAME, uid);
        if (ret != SERVICE_COMMON_ERROR_NONE)
-               ERR("failed to send notify:%d\n", ret);
+               ERR("Failed to send notify [%d]", ret);
+       else
+               DBG("Success to send notify");
 
-       DBG("shortcut_add is done");
 }
 
 /* add_shortcut_widget */
@@ -295,9 +296,9 @@ void shortcut_add_widget(GVariant *parameters, GDBusMethodInvocation *invocation
 
        ret = send_notify(parameters, "add_shortcut_widget_notify", &_monitoring_hash, PROVIDER_SHORTCUT_INTERFACE_NAME, uid);
        if (ret != SERVICE_COMMON_ERROR_NONE)
-               ERR("failed to send notify:%d\n", ret);
-
-       DBG("shortcut_add_widget is done");
+               ERR("Failed to send notify [%d]", ret);
+       else
+               DBG("Success to send notify");
 }
 
 /* remove_shortcut */
@@ -312,9 +313,9 @@ void shortcut_remove(GVariant *parameters, GDBusMethodInvocation *invocation, ui
 
        ret = send_notify(parameters, "remove_shortcut_notify", &_monitoring_hash, PROVIDER_SHORTCUT_INTERFACE_NAME, uid);
        if (ret != SERVICE_COMMON_ERROR_NONE)
-               ERR("failed to send notify:%d\n", ret);
-
-       DBG("shortcut_remove is done");
+               ERR("Failed to send notify [%d]", ret);
+       else
+               DBG("Success to send notify");
 }
 
 /*  check shortcut privilege */
@@ -343,11 +344,11 @@ int shortcut_send_return_value(GVariant *parameters, GVariant **reply_body)
 
        *reply_body = g_variant_new("()");
        if (*reply_body == NULL) {
-               ERR("Cannot make reply body");
+               ERR("Failed to make reply");
                return SHORTCUT_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("shortcut_send_return_value success");
+       DBG("Success to send return value");
        return SHORTCUT_ERROR_NONE;
 }
 
@@ -363,11 +364,11 @@ HAPI int shortcut_service_init(void)
 
        result = shortcut_register_dbus_interface();
        if (result != SERVICE_COMMON_ERROR_NONE) {
-               ERR("shortcut register dbus fail %d", result);
+               ERR("Failed to register dbus interface [%d]", result);
                return result;
        }
 
-       DBG("Successfully initialized\n");
+       DBG("Initialization success");
        return result;
 }
 
@@ -375,7 +376,7 @@ HAPI int shortcut_service_fini(void)
 {
        g_hash_table_destroy(_invocation_hash);
 
-       DBG("Successfully Finalized\n");
+       DBG("Finalization success");
        return SERVICE_COMMON_ERROR_NONE;
 }
 
index f593156..6699523 100755 (executable)
@@ -49,7 +49,7 @@ HAPI double util_timestamp(void)
        struct timeval tv;
        if (gettimeofday(&tv, NULL) < 0) {
                static unsigned long internal_count = 0;
-               ERR("gettimeofday: %d\n", errno);
+               ERR("gettimeofday [%d]", errno);
                tv.tv_sec = internal_count++;
                tv.tv_usec = 0;
        }
@@ -61,13 +61,13 @@ HAPI double util_timestamp(void)
 HAPI void util_setup_log_disk(void)
 {
        if (access(CONF_LOG_PATH, R_OK | W_OK | X_OK) == 0) {
-               DBG("[%s] is already accessible\n", CONF_LOG_PATH);
+               DBG("[%s] is already accessible", CONF_LOG_PATH);
                return;
        }
 
-       DBG("Initiate the critical log folder [%s]\n", CONF_LOG_PATH);
+       DBG("Initiate the critical log folder [%s]", CONF_LOG_PATH);
        if (mkdir(CONF_LOG_PATH, 0755) < 0)
-               ERR("mkdir: %d\n", errno);
+               ERR("mkdir: %d", errno);
 }
 
 HAPI const char *util_basename(const char *name)