Add error logs. 24/320824/1 tizen_9.0
authorNiraj Kumar Goit <niraj.g@samsung.com>
Fri, 7 Mar 2025 13:47:27 +0000 (19:17 +0530)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Fri, 7 Mar 2025 13:53:27 +0000 (19:23 +0530)
Change-Id: Ic61f0394103990ddcf5755c3981fd217fbe1036f
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
ua-api/include/ua-common.h
ua-daemon/src/ua-manager-core.c
ua-daemon/src/ua-manager-db.c

index 056a12aa35fce603de2e2e39e554bd250a38c4cc..415d2f31b35f1dabedcecf45aa32d2c9d8551d46 100644 (file)
@@ -51,8 +51,8 @@ extern "C" {
 #define UAM_ERR(fmt, arg...) \
        SLOGI_IF(TRUE, LOG_COLOR_RED" "fmt" "LOG_COLOR_RESET, ##arg)
 
-#define FUNC_ENTRY UAM_DBG("+")
-#define FUNC_EXIT UAM_DBG("-")
+#define FUNC_ENTRY UAM_INFO("+")
+#define FUNC_EXIT UAM_INFO("-")
 
 #define ret_if(expr) \
 do { \
index d15c41b2a822cd55d8ebb8e902d9ba66d5059a0f..15a7fc706f1843439c65b2edfa5bc6ec9395be50 100755 (executable)
@@ -1652,6 +1652,8 @@ done:
 static int __uam_remove_device(int user_id, uam_db_device_info_t *device,
        const uam_device_info_s *dev_info, uam_db_tech_info_t *tech, const int app_num)
 {
+       FUNC_ENTRY;
+
        int ret;
        GSList *l;
        int count = 0;
index 383b5ddd7d77649465423b51f89bca9749d5c145..a8f21fad41917cc858fffebb1a638e019663264d 100644 (file)
@@ -586,7 +586,7 @@ int __uam_db_begin_transaction(void)
 
                ret = __uam_db_exec_sql(sql, NULL);
                if (UAM_ERROR_NONE != ret)
-                       UAM_DBG("failed to begin transaction");
+                       UAM_ERR("failed to begin transaction");
                else
                        UAM_DBG("Successful to begin transaction");
 
@@ -609,7 +609,7 @@ static int __uam_db_rollback_transaction(void)
 
        ret = __uam_db_exec_sql(sql, NULL);
        if (UAM_ERROR_NONE != ret)
-               UAM_DBG("failed to rollback transaction");
+               UAM_ERR("failed to rollback transaction");
        else
                UAM_DBG("Successful to rollback transaction");
 
@@ -628,7 +628,7 @@ int __uam_db_end_transaction(gboolean is_success)
        transaction_cnt--;
 
        if (0 != transaction_cnt) {
-               UAM_DBG("transaction_cnt: %d", transaction_cnt);
+               UAM_ERR("transaction_cnt: %d", transaction_cnt);
                return ret;
        }
 
@@ -641,10 +641,10 @@ int __uam_db_end_transaction(gboolean is_success)
 
        ret = __uam_db_exec_sql(sql, NULL);
        if (UAM_ERROR_NONE != ret) {
-               UAM_DBG("failed to commit transaction");
+               UAM_ERR("failed to commit transaction");
                ret = __uam_db_rollback_transaction();
        } else
-               UAM_DBG("Successful to commit transaction");
+               UAM_INFO("Successful to commit transaction");
 
        sqlite3_free(sql);