Fix error log format 58/195358/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 13 Dec 2018 01:23:35 +0000 (10:23 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 13 Dec 2018 01:23:35 +0000 (10:23 +0900)
Change-Id: I11751316bdae33a7479b5c25407236a18893009c
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
client/autofill.c
client/autofill_auth.c
client/autofill_fill_request.c
common/autofill_fill_response.c
common/autofill_fill_response_group.c
common/autofill_fill_response_item.c
common/autofill_item.c
common/autofill_save_item.c
common/autofill_save_view_info.c
common/autofill_view_info.c
manager/autofill_manager.c

index 9469a51..28824ec 100644 (file)
@@ -79,8 +79,6 @@ static bool fill_response_group_cb(rpc_port_autofill_response_group_h response_g
     autofill_fill_response_h rh = (autofill_fill_response_h)user_data;
     autofill_fill_response_group_h res_group;
 
-    LOGD("");
-
     autofill_fill_response_group_create(&res_group);
 
     rpc_port_autofill_response_group_foreach_response_items(response_groups, fill_response_item_cb, res_group);
@@ -185,7 +183,7 @@ static void __on_connected(rpc_port_proxy_AutofillAppPort_h h, void *user_data)
 
     int r = rpc_port_proxy_AutofillAppPort_invoke_Register(h, ah->context_id, auth_info_received_cb, fill_response_received_cb);
     if (r != 0)
-        LOGD("Failed to invoke Register");
+        LOGW("[ERROR] Failed to invoke Register");
 
     if (ah->connection_callback)
         ah->connection_callback(ah, AUTOFILL_CONNECTION_STATUS_CONNECTED, ah->connection_userdata);
@@ -235,7 +233,7 @@ EXPORT_API int autofill_create(autofill_h *ah)
 
     ret = rpc_port_proxy_AutofillAppPort_create(AUTOFILL_DAEMON_APP_ID, &rpc_callback, as, &as->rpc_h);
     if (ret != RPC_PORT_ERROR_NONE) {
-        LOGW("Failed to create rpc port. err = %d", ret);
+        LOGW("[ERROR] Failed to create rpc port. err = %d", ret);
         free(as);
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
@@ -283,7 +281,7 @@ EXPORT_API int autofill_connect(autofill_h ah, autofill_connection_status_change
 
     ret = rpc_port_proxy_AutofillAppPort_connect(ah->rpc_h);
     if (ret != RPC_PORT_ERROR_NONE) {
-        LOGW("Failed to connect rpc port. err = %d", ret);
+        LOGW("[ERROR] Failed to connect rpc port. err = %d", ret);
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
     else {
@@ -358,7 +356,7 @@ EXPORT_API int autofill_commit(autofill_h ah, autofill_save_view_info_h vi)
     rpc_port_autofill_save_view_info_destroy(vih);
 
     if (ret != RPC_PORT_ERROR_NONE) {
-        LOGW("Failed to commit. rpc err = %d", ret);
+        LOGW("[ERROR] Failed to commit. rpc err = %d", ret);
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
     else {
index 815b358..d238b63 100644 (file)
@@ -94,7 +94,7 @@ EXPORT_API int autofill_auth_info_request(autofill_h ah, autofill_view_info_h vi
     rpc_port_autofill_view_info_destroy(vih);
 
     if (ret != RPC_PORT_ERROR_NONE) {
-        LOGW("Failed to send auth request. rpc err = %d", ret);
+        LOGW("[ERROR] Failed to send auth request. rpc err = %d", ret);
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
     else
index 50ca370..8dec709 100644 (file)
@@ -90,7 +90,7 @@ EXPORT_API int autofill_fill_request(autofill_h ah, autofill_view_info_h vi)
     rpc_port_autofill_view_info_destroy(vih);
 
     if (ret != RPC_PORT_ERROR_NONE) {
-        LOGW("Failed to send fill request. rpc err = %d", ret);
+        LOGW("[ERROR] Failed to send fill request. rpc err = %d", ret);
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
     else
index 8639e34..34179b9 100644 (file)
@@ -124,7 +124,7 @@ EXPORT_API int autofill_fill_response_add_group(autofill_fill_response_h h, auto
     autofill_fill_response_group_h clone;
     autofill_fill_response_group_clone(it, &clone);
     if (!clone) {
-        LOGW("Out of memory");
+        LOGW("[ERROR] Out of memory");
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
 
index 7013cee..0e11114 100644 (file)
@@ -61,13 +61,13 @@ EXPORT_API int autofill_fill_response_group_clone(autofill_fill_response_group_h
     autofill_fill_response_group_h handle = NULL;
 
     if (!h || !clone) {
-        LOGW("Invalid parameter");
+        LOGW("[ERROR] Invalid parameter");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
     autofill_fill_response_group_create(&handle);
     if (!handle) {
-        LOGW("Failed to create autofill_item handle");
+        LOGW("[ERROR] Failed to create autofill_item handle");
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
 
@@ -77,14 +77,14 @@ EXPORT_API int autofill_fill_response_group_clone(autofill_fill_response_group_h
     EINA_LIST_FOREACH(h->autofill_fill_response_item_list, l, it_h)
     {
         if (!it_h) {
-            LOGW("Can't get response item");
+            LOGW("[ERROR] Failed to get response item");
             autofill_fill_response_group_destroy(handle);
             return AUTOFILL_ERROR_OPERATION_FAILED;
         }
 
         autofill_fill_response_item_clone(it_h, &new_it_h);
         if (!new_it_h) {
-            LOGW("Failed to duplicate reponse item");
+            LOGW("[ERROR] Failed to duplicate reponse item");
             autofill_fill_response_group_destroy(handle);
             return AUTOFILL_ERROR_OPERATION_FAILED;
         }
index e9088d4..ef60672 100644 (file)
@@ -78,7 +78,7 @@ EXPORT_API int autofill_fill_response_item_clone(autofill_fill_response_item_h i
     int ret;
 
     if (!it || !clone) {
-        LOGW("Invalid parameter");
+        LOGW("[ERROR] Invalid parameter");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
@@ -87,14 +87,14 @@ EXPORT_API int autofill_fill_response_item_clone(autofill_fill_response_item_h i
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
 
     if (!handle) {
-        LOGW("Failed to create autofill_item handle");
+        LOGW("[ERROR] Failed to create autofill_item handle");
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
 
     if (it->id) {
         handle->id = strdup(it->id);
         if (!handle->id) {
-            LOGW("Failed to duplicate it->id");
+            LOGW("[ERROR] Failed to duplicate it->id");
             autofill_fill_response_item_destroy(handle);
             return AUTOFILL_ERROR_OUT_OF_MEMORY;
         }
@@ -103,7 +103,7 @@ EXPORT_API int autofill_fill_response_item_clone(autofill_fill_response_item_h i
     if (it->presentation_text) {
         handle->presentation_text = strdup(it->presentation_text);
         if (!handle->presentation_text) {
-            LOGW("Failed to duplicate it->presentation_text");
+            LOGW("[ERROR] Failed to duplicate it->presentation_text");
             autofill_fill_response_item_destroy(handle);
             return AUTOFILL_ERROR_OUT_OF_MEMORY;
         }
@@ -112,7 +112,7 @@ EXPORT_API int autofill_fill_response_item_clone(autofill_fill_response_item_h i
     if (it->value) {
         handle->value = strdup(it->value);
         if (!handle->value) {
-            LOGW("Failed to duplicate it->value");
+            LOGW("[ERROR] Failed to duplicate it->value");
             autofill_fill_response_item_destroy(handle);
             return AUTOFILL_ERROR_OUT_OF_MEMORY;
         }
index 450443a..8a20806 100644 (file)
@@ -82,20 +82,20 @@ EXPORT_API int autofill_item_clone(autofill_item_h h, autofill_item_h *clone)
     autofill_item_h handle;
 
     if (!h || !clone) {
-        LOGW("Invalid parameter");
+        LOGW("[ERROR] Invalid parameter");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
     autofill_item_create(&handle);
     if (!handle) {
-        LOGW("Failed to create autofill_item handle");
+        LOGW("[ERROR] Failed to create autofill_item handle");
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
 
     if (h->id) {
         handle->id = strdup(h->id);
         if (!handle->id) {
-            LOGW("Failed to duplicate h->id");
+            LOGW("[ERROR] Failed to duplicate h->id");
             autofill_item_destroy(handle);
             return AUTOFILL_ERROR_OUT_OF_MEMORY;
         }
@@ -104,7 +104,7 @@ EXPORT_API int autofill_item_clone(autofill_item_h h, autofill_item_h *clone)
     if (h->label) {
         handle->label = strdup(h->label);
         if (!handle->label) {
-            LOGW("Failed to duplicate h->label");
+            LOGW("[ERROR] Failed to duplicate h->label");
             autofill_item_destroy(handle);
             return AUTOFILL_ERROR_OUT_OF_MEMORY;
         }
@@ -113,7 +113,7 @@ EXPORT_API int autofill_item_clone(autofill_item_h h, autofill_item_h *clone)
     if (h->value) {
         handle->value = strdup(h->value);
         if (!handle->value) {
-            LOGW("Failed to duplicate h->value");
+            LOGW("[ERROR] Failed to duplicate h->value");
             autofill_item_destroy(handle);
             return AUTOFILL_ERROR_OUT_OF_MEMORY;
         }
@@ -216,7 +216,7 @@ EXPORT_API int autofill_item_set_sensitive_data(autofill_item_h it, bool sensiti
 EXPORT_API int autofill_item_get_sensitive_data(autofill_item_h it, bool *sensitive)
 {
     if (!it || !sensitive) {
-        LOGW("AUTOFILL_ERROR_INVALID_PARAMETER");
+        LOGW("[ERROR] AUTOFILL_ERROR_INVALID_PARAMETER");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
@@ -228,7 +228,7 @@ EXPORT_API int autofill_item_get_sensitive_data(autofill_item_h it, bool *sensit
 EXPORT_API int autofill_item_set_value(autofill_item_h it, const char *value)
 {
     if (!it || !value) {
-        LOGW("AUTOFILL_ERROR_INVALID_PARAMETER");
+        LOGW("[ERROR] AUTOFILL_ERROR_INVALID_PARAMETER");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
@@ -244,7 +244,7 @@ EXPORT_API int autofill_item_set_value(autofill_item_h it, const char *value)
 EXPORT_API int autofill_item_get_value(autofill_item_h it, char **value)
 {
     if (!it || !value) {
-        LOGW("AUTOFILL_ERROR_INVALID_PARAMETER");
+        LOGW("[ERROR] AUTOFILL_ERROR_INVALID_PARAMETER");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
index 4fa8e9c..dcae2c0 100644 (file)
@@ -82,7 +82,7 @@ EXPORT_API int autofill_save_item_clone(autofill_save_item_h it, autofill_save_i
     int ret;
 
     if (!it || !clone) {
-        LOGW("Invalid parameter");
+        LOGW("[ERROR] Invalid parameter");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
@@ -91,14 +91,14 @@ EXPORT_API int autofill_save_item_clone(autofill_save_item_h it, autofill_save_i
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
 
     if (!handle) {
-        LOGW("Failed to create autofill_save_item handle");
+        LOGW("[ERROR] Failed to create autofill_save_item handle");
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
 
     if (it->id) {
         handle->id = strdup(it->id);
         if (!handle->id) {
-            LOGW("Failed to duplicate it->id");
+            LOGW("[ERROR] Failed to duplicate it->id");
             autofill_save_item_destroy(handle);
             return AUTOFILL_ERROR_OUT_OF_MEMORY;
         }
@@ -107,7 +107,7 @@ EXPORT_API int autofill_save_item_clone(autofill_save_item_h it, autofill_save_i
     if (it->label) {
         handle->label = strdup(it->label);
         if (!handle->label) {
-            LOGW("Failed to duplicate it->label");
+            LOGW("[ERROR] Failed to duplicate it->label");
             autofill_save_item_destroy(handle);
             return AUTOFILL_ERROR_OUT_OF_MEMORY;
         }
@@ -116,7 +116,7 @@ EXPORT_API int autofill_save_item_clone(autofill_save_item_h it, autofill_save_i
     if (it->value) {
         handle->value = strdup(it->value);
         if (!handle->value) {
-            LOGW("Failed to duplicate it->value");
+            LOGW("[ERROR] Failed to duplicate it->value");
             autofill_save_item_destroy(handle);
             return AUTOFILL_ERROR_OUT_OF_MEMORY;
         }
@@ -219,7 +219,7 @@ EXPORT_API int autofill_save_item_set_sensitive_data(autofill_save_item_h it, bo
 EXPORT_API int autofill_save_item_get_sensitive_data(autofill_save_item_h it, bool *sensitive)
 {
     if (!it || !sensitive) {
-        LOGW("AUTOFILL_ERROR_INVALID_PARAMETER");
+        LOGW("[ERROR] AUTOFILL_ERROR_INVALID_PARAMETER");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
@@ -231,7 +231,7 @@ EXPORT_API int autofill_save_item_get_sensitive_data(autofill_save_item_h it, bo
 EXPORT_API int autofill_save_item_set_value(autofill_save_item_h it, const char *value)
 {
     if (!it || !value) {
-        LOGW("AUTOFILL_ERROR_INVALID_PARAMETER");
+        LOGW("[ERROR] AUTOFILL_ERROR_INVALID_PARAMETER");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
@@ -247,7 +247,7 @@ EXPORT_API int autofill_save_item_set_value(autofill_save_item_h it, const char
 EXPORT_API int autofill_save_item_get_value(autofill_save_item_h it, char **value)
 {
     if (!it || !value) {
-        LOGW("AUTOFILL_ERROR_INVALID_PARAMETER");
+        LOGW("[ERROR] AUTOFILL_ERROR_INVALID_PARAMETER");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
index 30e4a74..5185e1e 100644 (file)
@@ -130,7 +130,7 @@ EXPORT_API int autofill_save_view_info_add_item(autofill_save_view_info_h vi, au
 
     autofill_save_item_clone(it, &clone);
     if (!clone) {
-        LOGW("Out of memory");
+        LOGW("[ERROR] Out of memory");
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
 
index 1ba1d66..9d773df 100644 (file)
@@ -128,7 +128,7 @@ EXPORT_API int autofill_view_info_add_item(autofill_view_info_h vi, autofill_ite
 
     autofill_item_clone(it, &clone);
     if (!clone) {
-        LOGW("Out of memory");
+        LOGW("[ERROR] Out of memory");
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
 
index d7fbf77..10064c9 100644 (file)
@@ -75,12 +75,12 @@ EXPORT_API int autofill_manager_create(autofill_manager_h *amh)
     LOGD("autofill manager initialize");
 
     if (!amh) {
-        LOGW("Invalid paramater");
+        LOGW("[ERROR] Invalid paramater");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
     if (!check_privilege(AUTOFILL_MANAGER_PRIVILEGE)) {
-        LOGW("Permission denied");
+        LOGW("[ERROR] Permission denied");
         return AUTOFILL_ERROR_PERMISSION_DENIED;
     }
     else {
@@ -99,7 +99,7 @@ EXPORT_API int autofill_manager_create(autofill_manager_h *amh)
 
     ret = rpc_port_proxy_AutofillManagerPort_create(AUTOFILL_DAEMON_APP_ID, &rpc_callback, ams, &ams->rpc_h);
     if (ret != RPC_PORT_ERROR_NONE) {
-        LOGW("Failed to create rpc port. err = %d", ret);
+        LOGW("[ERROR] Failed to create rpc port. err = %d", ret);
         free(ams);
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
@@ -114,14 +114,14 @@ EXPORT_API int autofill_manager_destroy(autofill_manager_h amh)
     LOGD("autofill manager deinitialize");
 
     if (!amh) {
-        LOGW("Invalid paramater");
+        LOGW("[ERROR] Invalid paramater");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
     amh->connection_callback = NULL;
 
     if (!check_privilege(AUTOFILL_MANAGER_PRIVILEGE)) {
-        LOGW("Permission denied");
+        LOGW("[ERROR] Permission denied");
         return AUTOFILL_ERROR_PERMISSION_DENIED;
     }
     else {
@@ -143,17 +143,17 @@ EXPORT_API int autofill_manager_connect(autofill_manager_h amh, autofill_manager
     int ret;
 
     if (!amh || !callback) {
-        LOGW("parameter is NULL\n");
+        LOGW("[ERROR] parameter is NULL\n");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
     if (!check_privilege(AUTOFILL_MANAGER_PRIVILEGE)) {
-        LOGW("Permission denied");
+        LOGW("[ERROR] Permission denied");
         return AUTOFILL_ERROR_PERMISSION_DENIED;
     }
 
     if (!amh->rpc_h) {
-        LOGW("rpc handle is NULL");
+        LOGW("[ERROR] rpc handle is NULL");
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
 
@@ -163,12 +163,12 @@ EXPORT_API int autofill_manager_connect(autofill_manager_h amh, autofill_manager
     ret = rpc_port_proxy_AutofillManagerPort_connect(amh->rpc_h);
     switch (ret) {
         case RPC_PORT_ERROR_PERMISSION_DENIED:
-            LOGW("permission error");
+            LOGW("[ERROR] permission error");
             break;
     }
 
     if (ret != RPC_PORT_ERROR_NONE) {
-        LOGW("Failed to connect rpc port. err = %d", ret);
+        LOGW("[ERROR] Failed to connect rpc port. err = %d", ret);
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
 
@@ -180,23 +180,23 @@ EXPORT_API int autofill_manager_set_autofill_service(autofill_manager_h amh, con
     LOGD("autofill manager set autofill service");
 
     if (!amh || !app_id) {
-        LOGW("parameter is NULL");
+        LOGW("[ERROR] parameter is NULL");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
     if (!check_privilege(AUTOFILL_MANAGER_PRIVILEGE)) {
-        LOGW("Permission denied");
+        LOGW("[ERROR] Permission denied");
         return AUTOFILL_ERROR_PERMISSION_DENIED;
     }
 
     if (!amh->rpc_h) {
-        LOGW("rpc handle is NULL");
+        LOGW("[ERROR] rpc handle is NULL");
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
 
     bool ret = rpc_port_proxy_AutofillManagerPort_invoke_set_autofill_service(amh->rpc_h, app_id);
     if (ret == false) {
-        LOGW("Failed to send rpc port. err = %d", ret);
+        LOGW("[ERROR] Failed to send rpc port. err = %d", ret);
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
     return AUTOFILL_ERROR_NONE;
@@ -207,17 +207,17 @@ EXPORT_API int autofill_manager_get_autofill_service(autofill_manager_h amh, cha
     LOGD("autofill manager get autofill service");
 
     if (!amh || !service_app_id) {
-        LOGW("parameter is NULL");
+        LOGW("[ERROR] parameter is NULL");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
     if (!check_privilege(AUTOFILL_MANAGER_PRIVILEGE)) {
-        LOGW("Permission denied");
+        LOGW("[ERROR] Permission denied");
         return AUTOFILL_ERROR_PERMISSION_DENIED;
     }
 
     if (!amh->rpc_h) {
-        LOGW("Not initialized");
+        LOGW("[ERROR] Not initialized");
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
 
@@ -237,17 +237,17 @@ EXPORT_API int autofill_manager_foreach_autofill_service(autofill_manager_h amh,
     int ret;
 
     if (!amh || !callback) {
-        LOGW("parameter is NULL");
+        LOGW("[ERROR] parameter is NULL");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
     if (!check_privilege(AUTOFILL_MANAGER_PRIVILEGE)) {
-        LOGW("Permission denied");
+        LOGW("[ERROR] Permission denied");
         return AUTOFILL_ERROR_PERMISSION_DENIED;
     }
 
     if (!amh->rpc_h) {
-        LOGW("rpc handle is NULL\n");
+        LOGW("[ERROR] rpc handle is NULL\n");
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
 
@@ -255,7 +255,7 @@ EXPORT_API int autofill_manager_foreach_autofill_service(autofill_manager_h amh,
     rpc_port_list_string_create(&app_id_list);
     ret = rpc_port_proxy_AutofillManagerPort_invoke_get_autofill_service_list(amh->rpc_h, &app_id_list);
     if (ret == false) {
-        LOGW("Failed to send rpc port. err = %d", ret);
+        LOGW("[ERROR] Failed to send rpc port. err = %d", ret);
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
     rpc_port_list_string_foreach_list_strings(app_id_list, callback, user_data);