Change the type of some log messages from DEBUG to INFO 28/246228/2 accepted/tizen/unified/20201028.123915 submit/tizen/20201027.073130
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 27 Oct 2020 06:54:39 +0000 (15:54 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 27 Oct 2020 07:21:10 +0000 (16:21 +0900)
TV image doesn't show DEBUG message.

Change-Id: I6febbb33c936bbb7f3d9440faf8e01681b842179

provider/download-provider-client-manager.c
provider/download-provider-client.c
provider/download-provider-db.c
provider/download-provider-ipc.c
provider/download-provider-queue-manager.c

index e06b372..403853d 100755 (executable)
@@ -355,11 +355,11 @@ static bool __dp_client_run_with_same_client(dp_client_slots_fmt *clients, int c
                if (locked != 0) // empty or used by other thread. it would be same client, but it's busy
                        continue;
 
-               TRACE_DEBUG("locked slot:%d", i);
+               TRACE_INFO("locked slot:%d", i);
                if (locked == 0 && clients[i].thread == 0) { // this slot has run without the client
                        if (clients[i].pkgname != NULL) {
                                // check package name.
-                               TRACE_DEBUG("check client[%s] slot:%d", clients[i].pkgname, i);
+                               TRACE_INFO("check client[%s] slot:%d", clients[i].pkgname, i);
                                if (strcmp(clients[i].pkgname, pkgname) == 0) {
                                        TRACE_SECURE_INFO("update client[%s] slot:%d pid:%d sock:%d",
                                                        pkgname, i, credential.pid, clientfd);
@@ -722,7 +722,7 @@ void *dp_client_manager(void *arg)
        __dp_db_free_client_manager();
 
        // kill other clients
-       TRACE_DEBUG("try to deallocate the resources for all clients");
+       TRACE_INFO("try to deallocate the resources for all clients");
        for (int i = 0; i < DP_MAX_CLIENTS; i++) {
                int locked = CLIENT_MUTEX_TRYLOCK(&g_dp_client_slots[i].mutex);
                if (locked == EBUSY) { // already locked
index 07a065a..0c838a9 100755 (executable)
@@ -325,7 +325,7 @@ static int __dp_get_download_id(dp_client_fmt *client)
        do {
                retry_count++;
                if (download_id < INT_MAX) {
-                       TRACE_DEBUG("download_id [%d]", download_id);
+                       TRACE_INFO("download_id [%d]", download_id);
                        check_duplicate = dp_db_check_duplicated_int(client->dbhandle,
                                        DP_TABLE_LOGGING, DP_DB_COL_ID, download_id, &errorcode);
                        if (errorcode == DP_ERROR_NONE) {
@@ -376,7 +376,7 @@ void dp_request_create(dp_client_fmt *client, dp_request_fmt *request)
        else
                prevp->next = request; // attach at the tail
 
-       TRACE_DEBUG("sock:%d download-id:%d", client->channel, request->id);
+       TRACE_INFO("sock:%d download-id:%d", client->channel, request->id);
 }
 
 static int __dp_request_create(dp_client_fmt *client, dp_ipc_fmt *ipc_info)
@@ -1910,7 +1910,7 @@ void *dp_client_request_thread(void *arg)
                                TRACE_ERROR("sock:%d maybe closed", client_sock);
                                errorcode = DP_ERROR_IO_ERROR;
                        } else {
-                               TRACE_DEBUG("sock:%d id:%d section:%s property:%s errorcode:%s size:%zd",
+                               TRACE_INFO("sock:%d id:%d section:%s property:%s errorcode:%s size:%zd",
                                                client_sock, ipc_info->id,
                                                dp_print_section(ipc_info->section),
                                                dp_print_property(ipc_info->property),
index ff97988..2f6ac3f 100755 (executable)
@@ -168,6 +168,7 @@ static int __db_open(sqlite3 **handle, char *database, int *errorcode)
                                *handle = 0;
                                return -1;
                        }
+                       TRACE_INFO("new database is created.");
                } else {
                        TRACE_ERROR("can not handle this error(%d):%s", sqlerrcode, sqlite3_errmsg(*handle));
                        *errorcode = DP_ERROR_OUT_OF_MEMORY;
index 0375219..d227179 100644 (file)
 
 #include <stdio.h>
 #include <stdlib.h>
-
-#include <time.h>
-
 #include <sys/socket.h> // shutdown
+#include <time.h>
+#include <errno.h>
 
 #include "download-provider-log.h"
 #include "download-provider-ipc.h"
@@ -57,6 +56,7 @@ int dp_ipc_write(int sock, void *value, size_t type_size)
                TRACE_ERROR("[IPC.Write] exception sock:%d", sock);
                return -1;
        }
+       TRACE_INFO("[IPC.Write] succeed sock:%d", sock);
        return 0;
 }
 
@@ -101,7 +101,7 @@ dp_ipc_fmt *dp_ipc_get_fmt(int sock)
        memset(ipc_info, 0x00, sizeof(dp_ipc_fmt));
        ssize_t recv_size = read(sock, ipc_info, sizeof(dp_ipc_fmt));
        if (recv_size <= 0 || recv_size != sizeof(dp_ipc_fmt)) {
-               TRACE_ERROR("socket read ipcinfo read size:%zd", recv_size);
+               TRACE_ERROR("socket read ipcinfo read size:%zd, errno:%d", recv_size, errno);
                free(ipc_info);
                return NULL;
        }
index 4555dab..73ebc45 100644 (file)
@@ -261,7 +261,7 @@ static void *__dp_queue_manager(void *arg)
                CLIENT_MUTEX_UNLOCK(&g_dp_queue_manager_mutex);
        } while (g_dp_queue_manager_tid > 0);
 
-       TRACE_DEBUG("queue-manager's working is done");
+       TRACE_INFO("queue-manager's working is done");
        dp_deinit_agent();
        dp_queue_clear_all(&g_dp_queue_network_all);
        pthread_cond_destroy(&g_dp_queue_manager_cond);