Revise log related code 67/244967/3 submit/tizen/20201012.060154
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 28 Sep 2020 11:19:24 +0000 (20:19 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 29 Sep 2020 11:24:41 +0000 (20:24 +0900)
[Version] 0.4.40
[Issue Type] Log

Change-Id: I70c336478b8ed9e72750a5b18c1047185f17ea01
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
include/camera_private.h
packaging/capi-media-camera.spec
src/camera.c
test/camera_test.c

index 3dfa516..7a171de 100644 (file)
@@ -53,12 +53,58 @@ extern "C" {
 #define SET_PREVIEW_CB_TYPE(cb_info, cb_type) ((cb_info)->preview_cb_flag |= cb_type)
 #define UNSET_PREVIEW_CB_TYPE(cb_info, cb_type) ((cb_info)->preview_cb_flag &= ~cb_type)
 
+#define CAM_LOG_CRITICAL(format, args...) \
+       do { \
+               if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_CRITICAL) \
+                       LOGF(format, ##args); \
+       } while (0)
+
+#define CAM_LOG_ERROR(format, args...) \
+       do { \
+               if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_ERROR) \
+                       LOGE(format, ##args); \
+       } while (0)
+
+#define CAM_LOG_WARNING(format, args...) \
+       do { \
+               if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_WARNING) \
+                       LOGW(format, ##args); \
+       } while (0)
+
+#define CAM_LOG_INFO(format, args...) \
+       do { \
+               if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_INFO) \
+                       LOGI(format, ##args); \
+       } while (0)
+
+#define CAM_LOG_DEBUG(format, args...) \
+       do { \
+               if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_DEBUG) \
+                       LOGD(format, ##args); \
+       } while (0)
+
+#define CAM_LOG_VERBOSE(format, args...) \
+       do { \
+               if (g_mmcam_log_level >= CAMERA_LOG_LEVEL_VERBOSE) \
+                       LOGD("[V] "format, ##args); \
+       } while (0)
+
+
 enum {
        CAMERA_MESSAGE_HANDLER_TYPE_GENERAL,
        CAMERA_MESSAGE_HANDLER_TYPE_PREVIEW_CB,
        CAMERA_MESSAGE_HANDLER_TYPE_CAPTURE_CB
 };
 
+enum {
+       CAMERA_LOG_LEVEL_CRITICAL = 0,
+       CAMERA_LOG_LEVEL_ERROR,
+       CAMERA_LOG_LEVEL_WARNING,
+       CAMERA_LOG_LEVEL_INFO,
+       CAMERA_LOG_LEVEL_DEBUG,
+       CAMERA_LOG_LEVEL_VERBOSE
+};
+
 typedef struct _camera_msg_handler_info_s {
        int type;
        void *cb_info;
index 3baeb57..fc9a0dd 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-camera
 Summary:    A Camera API
-Version:    0.4.39
+Version:    0.4.40
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index ae8991f..4ffe0ed 100644 (file)
@@ -40,6 +40,9 @@ static GDBusConnection *g_cam_dev_state_changed_cb_conn;
 static guint g_cam_dev_state_changed_cb_subscribe_id;
 static GMutex g_cam_idle_event_lock;
 
+/* log level */
+int g_mmcam_log_level;
+
 static void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
        int *ret, int timeout);
 static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
@@ -70,28 +73,28 @@ static gboolean _camera_allocate_preview_buffer(camera_h camera)
        camera_cb_info_s *cb_info = NULL;
 
        if (!pc || !pc->cb_info) {
-               LOGE("invalid pointer %p %p", pc, pc ? pc->cb_info : NULL);
+               CAM_LOG_ERROR("invalid pointer %p %p", pc, pc ? pc->cb_info : NULL);
                return FALSE;
        }
 
        cb_info = pc->cb_info;
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        /* get preview info and calculate size */
        ret = camera_get_preview_format(camera, &format);
        if (ret != CAMERA_ERROR_NONE) {
-               LOGE("get preview format failed 0x%x", ret);
+               CAM_LOG_ERROR("get preview format failed 0x%x", ret);
                return FALSE;
        }
 
        ret = camera_get_preview_resolution(camera, &width, &height);
        if (ret != CAMERA_ERROR_NONE) {
-               LOGE("get preview resolution failed 0x%x", ret);
+               CAM_LOG_ERROR("get preview resolution failed 0x%x", ret);
                return FALSE;
        }
 
-       LOGD("preview %dx%d, format %d", width, height, format);
+       CAM_LOG_INFO("preview %dx%d, format %d", width, height, format);
 
        switch (format) {
        case CAMERA_PIXEL_FORMAT_INVZ:
@@ -106,29 +109,29 @@ static gboolean _camera_allocate_preview_buffer(camera_h camera)
                buffer_size = width * height * 2;
                break;
        default:
-               LOGE("unhandled format %d", format);
+               CAM_LOG_ERROR("unhandled format %d", format);
                goto _ALLOCATE_PREVIEW_BUFFER_FAILED;
        }
 
-       LOGD("buffer size %d, num %d", buffer_size, MUSE_NUM_FD);
+       CAM_LOG_INFO("buffer size %d, num %d", buffer_size, MUSE_NUM_FD);
 
        for (i = 0 ; i < MUSE_NUM_FD ; i++) {
                cb_info->bos[i] = tbm_bo_alloc(cb_info->bufmgr, buffer_size, TBM_BO_DEFAULT);
                if (!cb_info->bos[i]) {
-                       LOGE("bo alloc failed [%d,i:%d]", buffer_size, i);
+                       CAM_LOG_ERROR("bo alloc failed [%d,i:%d]", buffer_size, i);
                        goto _ALLOCATE_PREVIEW_BUFFER_FAILED;
                }
 
                cb_info->fds[i] = tbm_bo_export_fd(cb_info->bos[i]);
                if (cb_info->fds[i] < 0) {
-                       LOGE("export fd failed [%d,i:%d] errno %d", buffer_size, i, errno);
+                       CAM_LOG_ERROR("export fd failed [%d,i:%d] errno %d", buffer_size, i, errno);
                        goto _ALLOCATE_PREVIEW_BUFFER_FAILED;
                }
 
-               LOGD("bo %p, fd %d", cb_info->bos[i], cb_info->fds[i]);
+               CAM_LOG_INFO("bo %p, fd %d", cb_info->bos[i], cb_info->fds[i]);
        }
 
-       LOGD("Done");
+       CAM_LOG_INFO("Done");
 
        return TRUE;
 
@@ -145,17 +148,17 @@ static void _camera_release_preview_buffer(camera_h camera)
        camera_cb_info_s *cb_info = NULL;
 
        if (!pc || !pc->cb_info) {
-               LOGE("invalid pointer %p %p", pc, pc ? pc->cb_info : NULL);
+               CAM_LOG_ERROR("invalid pointer %p %p", pc, pc ? pc->cb_info : NULL);
                return;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        cb_info = pc->cb_info;
 
        /* close exported fd and bos */
        for (i = 0 ; i < MUSE_NUM_FD ; i++) {
-               LOGD("unref bo %p, close fd %d", cb_info->bos[i], cb_info->fds[i]);
+               CAM_LOG_INFO("unref bo %p, close fd %d", cb_info->bos[i], cb_info->fds[i]);
 
                if (cb_info->bos[i]) {
                        tbm_bo_unref(cb_info->bos[i]);
@@ -170,7 +173,7 @@ static void _camera_release_preview_buffer(camera_h camera)
                }
        }
 
-       LOGD("Done");
+       CAM_LOG_INFO("Done");
 
        return;
 }
@@ -180,7 +183,7 @@ static void __camera_update_api_waiting(camera_cb_info_s *cb_info, int api, int
 {
        if (!cb_info ||
                api < 0 || api >= MUSE_CAMERA_API_MAX) {
-               LOGE("invalid param %p %d", cb_info, api);
+               CAM_LOG_ERROR("invalid param %p %d", cb_info, api);
                return;
        }
 
@@ -188,8 +191,8 @@ static void __camera_update_api_waiting(camera_cb_info_s *cb_info, int api, int
        cb_info->api_waiting[api] += value;
        g_mutex_unlock(&(cb_info->api_mutex[api]));
 
-       /*LOGD("api %d, value %d, waiting %d",
-               api, value, cb_info->api_waiting[api]);*/
+       CAM_LOG_DEBUG("api[%d], value[%d], waiting[%d]",
+               api, value, cb_info->api_waiting[api]);
 
        return;
 }
@@ -208,7 +211,7 @@ static void __camera_device_state_changed_cb(GDBusConnection *connection,
        g_mutex_lock(&g_cam_dev_state_changed_cb_lock);
 
        if (!g_cam_dev_state_changed_cb_list || !param) {
-               LOGW("no callback or NULL param %p", param);
+               CAM_LOG_WARNING("no callback or NULL param %p", param);
                goto _DONE;
        }
 
@@ -218,7 +221,7 @@ static void __camera_device_state_changed_cb(GDBusConnection *connection,
        device = value >> 16;
        state = 0x0000ffff & value;
 
-       LOGD("device %d, state %d", device, state);
+       CAM_LOG_INFO("device %d, state %d", device, state);
 
        tmp_list = g_cam_dev_state_changed_cb_list;
 
@@ -227,11 +230,11 @@ static void __camera_device_state_changed_cb(GDBusConnection *connection,
 
                if (info) {
                        if (info->callback) {
-                               LOGD("start id[%d] callback", info->id);
+                               CAM_LOG_INFO("start id[%d] callback", info->id);
                                ((camera_device_state_changed_cb)info->callback)(device, state, info->user_data);
-                               LOGD("returned id[%d] callback", info->id);
+                               CAM_LOG_INFO("returned id[%d] callback", info->id);
                        } else {
-                               LOGW("NULL callback for id %d", info->id);
+                               CAM_LOG_WARNING("NULL callback for id %d", info->id);
                        }
                }
 
@@ -274,19 +277,19 @@ static void __camera_event_handler_preview(camera_cb_info_s *cb_info, char *recv
           tfd[3]: zero copy bo[2] */
 
        if (!cb_info || !recv_msg || !tfd) {
-               LOGE("invalid param %p %p %p", cb_info, recv_msg, tfd);
+               CAM_LOG_ERROR("invalid param %p %p %p", cb_info, recv_msg, tfd);
                return;
        }
 
        muse_camera_msg_get(preview_fd, recv_msg);
        muse_camera_msg_get(num_buffer_fd, recv_msg);
 
-       /*LOGD("preview_fd %d, num_buffer_fd %d", preview_fd, num_buffer_fd);*/
+       CAM_LOG_DEBUG("preview_fd %d, num_buffer_fd %d", preview_fd, num_buffer_fd);
 
        memset(&frame, 0x0, sizeof(camera_preview_data_s));
 
        if (tfd[0] < 0) {
-               LOGE("invalid fd %d", tfd[0]);
+               CAM_LOG_ERROR("invalid fd %d", tfd[0]);
                return;
        }
 
@@ -294,21 +297,21 @@ static void __camera_event_handler_preview(camera_cb_info_s *cb_info, char *recv
        CAMERA_MSG_PARAM_SET(param, INT, ret_fd);
 
        if (num_buffer_fd < 0 || num_buffer_fd > BUFFER_MAX_PLANE_NUM) {
-               LOGE("invalid num buffer fd %d", num_buffer_fd);
+               CAM_LOG_ERROR("invalid num buffer fd %d", num_buffer_fd);
                goto _PREVIEW_CB_HANDLER_DONE;
        }
 
        if (num_buffer_fd == 0 && tfd[1] >= 0) {
                /* import tbm data_bo and get virtual address */
                if (!_camera_import_tbm_fd(cb_info->bufmgr, tfd[1], &data_bo, &data_bo_handle)) {
-                       LOGE("failed to import data fd %d", tfd[1]);
+                       CAM_LOG_ERROR("failed to import data fd %d", tfd[1]);
                        goto _PREVIEW_CB_HANDLER_DONE;
                }
        }
 
        /* import tbm bo and get virtual address */
        if (!_camera_import_tbm_fd(cb_info->bufmgr, tfd[0], &bo, &bo_handle)) {
-               LOGE("failed to import fd %d", tfd[0]);
+               CAM_LOG_ERROR("failed to import fd %d", tfd[0]);
                goto _PREVIEW_CB_HANDLER_DONE;
        }
 
@@ -320,7 +323,7 @@ static void __camera_event_handler_preview(camera_cb_info_s *cb_info, char *recv
        for (i = 0 ; i < num_buffer_fd ; i++) {
                /* import buffer bo and get virtual address */
                if (!_camera_import_tbm_fd(cb_info->bufmgr, tfd[i + 1], &buffer_bo[i], &buffer_bo_handle[i])) {
-                       LOGE("failed to import buffer fd %d", tfd[i + 1]);
+                       CAM_LOG_ERROR("failed to import buffer fd %d", tfd[i + 1]);
                        goto _PREVIEW_CB_HANDLER_DONE;
                }
        }
@@ -339,7 +342,7 @@ static void __camera_event_handler_preview(camera_cb_info_s *cb_info, char *recv
                if (ret == CAMERA_ERROR_NONE) {
                        ret = _camera_media_packet_create(cb_info, stream, mp_data, &pkt_evas);
                        if (ret != CAMERA_ERROR_NONE) {
-                               LOGE("create pkt for evas failed");
+                               CAM_LOG_ERROR("create pkt for evas failed");
                                _camera_media_packet_data_release(mp_data, cb_info);
                                mp_data = NULL;
                        }
@@ -368,7 +371,7 @@ static void __camera_event_handler_preview(camera_cb_info_s *cb_info, char *recv
                if (cb_info->run_evas_render) {
                        mm_display_interface_evas_render(cb_info->dp_interface, pkt_evas);
                } else {
-                       LOGW("evas renderer is stopped, skip this buffer...");
+                       CAM_LOG_WARNING("evas renderer is stopped, skip this buffer...");
                        media_packet_destroy(pkt_evas);
                }
                pkt_evas = NULL;
@@ -401,7 +404,7 @@ _PREVIEW_CB_HANDLER_DONE:
                /* return buffer */
                _camera_msg_send_param1(MUSE_CAMERA_API_RETURN_BUFFER, cb_info, NULL, &param, 0);
 
-               /*LOGD("return buffer Done");*/
+               CAM_LOG_DEBUG("return buffer Done[tfd:%d, ret fd:%d]", tfd[0], ret_fd);
        }
 
        return;
@@ -429,7 +432,7 @@ static void __camera_event_handler_capture(camera_cb_info_s *cb_info, char *recv
        tbm_bo_handle bo_thumb_handle = {.ptr = NULL};
 
        if (!cb_info || !recv_msg || !tfd) {
-               LOGE("invalid param %p %p %p", cb_info, recv_msg, tfd);
+               CAM_LOG_ERROR("invalid param %p %p %p", cb_info, recv_msg, tfd);
                return;
        }
 
@@ -437,23 +440,23 @@ static void __camera_event_handler_capture(camera_cb_info_s *cb_info, char *recv
        muse_camera_msg_get(capture_fd_post, recv_msg);
        muse_camera_msg_get(capture_fd_thumb, recv_msg);
 
-       LOGD("capture fd %d %d %d, received fd %d %d %d",
+       CAM_LOG_INFO("capture fd %d %d %d, received fd %d %d %d",
                capture_fd_main, capture_fd_post, capture_fd_thumb,
                tfd[0], tfd[1], tfd[2]);
 
        if (capture_fd_main < 0 || tfd[tfd_index] < 0) {
-               LOGE("invalid main fd %d %d", capture_fd_main, tfd[tfd_index]);
+               CAM_LOG_ERROR("invalid main fd %d %d", capture_fd_main, tfd[tfd_index]);
                goto _CAPTURE_CB_HANDLER_DONE;
        }
 
        if (cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_CAPTURE] == NULL) {
-               LOGW("NULL callback");
+               CAM_LOG_WARNING("NULL callback");
                goto _CAPTURE_CB_HANDLER_DONE;
        }
 
        /* import tbm bo and get virtual address */
        if (!_camera_import_tbm_fd(cb_info->bufmgr, tfd[tfd_index], &bo_main, &bo_main_handle)) {
-               LOGE("failed to import fd [%d] for main", tfd[tfd_index]);
+               CAM_LOG_ERROR("failed to import fd [%d] for main", tfd[tfd_index]);
                goto _CAPTURE_CB_HANDLER_DONE;
        }
 
@@ -467,7 +470,7 @@ static void __camera_event_handler_capture(camera_cb_info_s *cb_info, char *recv
                rImage->exif_size = 0;
        }
 
-       LOGD("image info %dx%d, size %d, EXIF info %p, size %d",
+       CAM_LOG_INFO("image info %dx%d, size %d, EXIF info %p, size %d",
                rImage->width, rImage->height, rImage->size, rImage->exif, rImage->exif_size);
 
        if (capture_fd_post >= 0) {
@@ -476,10 +479,10 @@ static void __camera_event_handler_capture(camera_cb_info_s *cb_info, char *recv
                if (_camera_import_tbm_fd(cb_info->bufmgr, tfd[tfd_index], &bo_post, &bo_post_handle)) {
                        buf_pos = (unsigned char *)bo_post_handle.ptr;
                        rPostview = (camera_image_data_s *)buf_pos;
-                       LOGD("rPostview->size : %d", rPostview->size);
+                       CAM_LOG_INFO("rPostview->size : %d", rPostview->size);
                        rPostview->data = buf_pos + sizeof(camera_image_data_s);
                } else {
-                       LOGE("failed to import fd [i:%d][%d] for postview", tfd_index, tfd[tfd_index]);
+                       CAM_LOG_ERROR("failed to import fd [i:%d][%d] for postview", tfd_index, tfd[tfd_index]);
                }
        }
 
@@ -489,10 +492,10 @@ static void __camera_event_handler_capture(camera_cb_info_s *cb_info, char *recv
                if (_camera_import_tbm_fd(cb_info->bufmgr, tfd[tfd_index], &bo_thumb, &bo_thumb_handle)) {
                        buf_pos = (unsigned char *)bo_thumb_handle.ptr;
                        rThumbnail = (camera_image_data_s *)buf_pos;
-                       LOGD("rThumbnail->size : %d", rThumbnail->size);
+                       CAM_LOG_INFO("rThumbnail->size : %d", rThumbnail->size);
                        rThumbnail->data = buf_pos + sizeof(camera_image_data_s);
                } else {
-                       LOGE("failed to import fd [%d] for thumbnail", tfd[tfd_index]);
+                       CAM_LOG_ERROR("failed to import fd [%d] for thumbnail", tfd[tfd_index]);
                }
        }
 
@@ -518,7 +521,7 @@ _CAPTURE_CB_HANDLER_DONE:
 
        for (i = 0 ; i < MUSE_NUM_FD ; i++) {
                if (tfd[i] >= 0) {
-                       LOGD("close %d", tfd[i]);
+                       CAM_LOG_INFO("close %d", tfd[i]);
                        close(tfd[i]);
                        tfd[i] = -1;
                } else {
@@ -526,7 +529,7 @@ _CAPTURE_CB_HANDLER_DONE:
                }
        }
 
-       LOGD("return buffer done");
+       CAM_LOG_INFO("return buffer done");
 
        return;
 }
@@ -542,7 +545,7 @@ static void __camera_event_handler_face_detection(camera_cb_info_s *cb_info, cha
        tbm_bo_handle bo_handle = {.ptr = NULL};
 
        if (!cb_info || !recv_msg || !tfd) {
-               LOGE("invalid param %p %p %p", cb_info, recv_msg, tfd);
+               CAM_LOG_ERROR("invalid param %p %p %p", cb_info, recv_msg, tfd);
                return;
        }
 
@@ -550,7 +553,7 @@ static void __camera_event_handler_face_detection(camera_cb_info_s *cb_info, cha
        muse_camera_msg_get(face_fd, recv_msg);
 
        if (count >= 0 && cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION]) {
-               LOGD("FACE_DETECTION - count %d, fd %d", count, tfd[0]);
+               CAM_LOG_INFO("FACE_DETECTION - count %d, fd %d", count, tfd[0]);
 
                if (tfd[0] >= 0) {
                        if (_camera_import_tbm_fd(cb_info->bufmgr, tfd[0], &bo, &bo_handle)) {
@@ -568,7 +571,7 @@ static void __camera_event_handler_face_detection(camera_cb_info_s *cb_info, cha
                /* release bo */
                _camera_release_imported_bo(&bo);
        } else {
-               LOGW("skip face detection message [count %d, fd %d, cb %p]",
+               CAM_LOG_WARNING("skip face detection message [count %d, fd %d, cb %p]",
                        count, tfd[0], cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION]);
        }
 
@@ -585,20 +588,20 @@ static bool _camera_import_tbm_fd(tbm_bufmgr bufmgr, int fd, tbm_bo *bo, tbm_bo_
        tbm_bo_handle tmp_bo_handle = {NULL, };
 
        if (!bufmgr || !bo || !bo_handle || fd < 0) {
-               LOGE("invalid parameter - %p %p %p, fd %d",
+               CAM_LOG_ERROR("invalid parameter - %p %p %p, fd %d",
                     bufmgr, bo, bo_handle, fd);
                return false;
        }
 
        tmp_bo = tbm_bo_import_fd(bufmgr, (tbm_fd)fd);
        if (tmp_bo == NULL) {
-               LOGE("import failed - fd %d", fd);
+               CAM_LOG_ERROR("import failed - fd %d", fd);
                return false;
        }
 
        tmp_bo_handle = tbm_bo_map(tmp_bo, TBM_DEVICE_CPU, TBM_OPTION_READ);
        if (tmp_bo_handle.ptr == NULL) {
-               LOGE("map failed %p", tmp_bo);
+               CAM_LOG_ERROR("map failed %p", tmp_bo);
                tbm_bo_unref(tmp_bo);
                tmp_bo = NULL;
                return false;
@@ -610,13 +613,15 @@ static bool _camera_import_tbm_fd(tbm_bufmgr bufmgr, int fd, tbm_bo *bo, tbm_bo_
        *bo = tmp_bo;
        *bo_handle = tmp_bo_handle;
 
+       CAM_LOG_VERBOSE("fd[%d] -> bo[%p]", fd, tmp_bo);
+
        return true;
 }
 
 static void _camera_release_imported_bo(tbm_bo *bo)
 {
        if (!bo || !(*bo)) {
-               /*LOGW("NULL bo");*/
+               CAM_LOG_DEBUG("NULL bo");
                return;
        }
 
@@ -632,28 +637,28 @@ static int _camera_client_wait_for_cb_return(muse_camera_api_e api, camera_cb_in
        gint64 end_time;
 
        if (!cb_info->is_server_connected) {
-               LOGE("server is disconnected");
+               CAM_LOG_ERROR("server is disconnected");
                return CAMERA_ERROR_SERVICE_DISCONNECTED;
        }
 
        g_mutex_lock(&(cb_info->api_mutex[api]));
 
-       LOGD("api [%d], timeout [%d sec]", api, time_out);
+       CAM_LOG_INFO("api [%d], timeout [%d sec]", api, time_out);
 
        end_time = g_get_monotonic_time() + time_out * G_TIME_SPAN_SECOND;
 
        while (!cb_info->api_activating[api]) {
                if (time_out == CAMERA_CB_NO_TIMEOUT) {
                        g_cond_wait(&(cb_info->api_cond[api]), &(cb_info->api_mutex[api]));
-                       LOGW("api %d returned 0x%x", api, cb_info->api_ret[api]);
+                       CAM_LOG_WARNING("api %d returned 0x%x", api, cb_info->api_ret[api]);
                } else if (!g_cond_wait_until(&(cb_info->api_cond[api]), &(cb_info->api_mutex[api]), end_time)) {
-                       LOGE("api %d TIMED OUT!", api);
+                       CAM_LOG_ERROR("api %d TIMED OUT!", api);
                        ret = CAMERA_ERROR_INVALID_OPERATION;
                        goto _CB_RETURN_END;
                }
 
                if (!cb_info->api_activating[api])
-                       LOGW("invalid signal received, wait again...");
+                       CAM_LOG_WARNING("invalid signal received, wait again...");
        }
 
        ret = cb_info->api_ret[api];
@@ -663,7 +668,7 @@ _CB_RETURN_END:
        g_mutex_unlock(&(cb_info->api_mutex[api]));
 
        if (ret != CAMERA_ERROR_NONE)
-               LOGE("api %d : error 0x%x", api, ret);
+               CAM_LOG_ERROR("api %d : error 0x%x", api, ret);
 
        return ret;
 }
@@ -676,7 +681,7 @@ static void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
        char *msg = NULL;
 
        if (!cb_info) {
-               LOGE("NULL info - api %d", api);
+               CAM_LOG_ERROR("NULL info - api %d", api);
 
                if (ret)
                        *ret = CAMERA_ERROR_INVALID_PARAMETER;
@@ -686,7 +691,7 @@ static void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
 
        msg = muse_core_msg_new(api, NULL);
        if (!msg) {
-               LOGE("msg failed: api %d", api);
+               CAM_LOG_ERROR("msg failed: api %d", api);
 
                if (ret)
                        *ret = CAMERA_ERROR_OUT_OF_MEMORY;
@@ -694,7 +699,7 @@ static void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
                return;
        }
 
-       /*LOGD("send msg %s", msg);*/
+       CAM_LOG_DEBUG("send msg[%s]", msg);
 
        if (cb_info->is_server_connected) {
                __camera_update_api_waiting(cb_info, api, 1);
@@ -705,7 +710,7 @@ static void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
        }
 
        if (send_ret < 0) {
-               LOGE("msg send failed");
+               CAM_LOG_ERROR("msg send failed");
                if (ret)
                        *ret = CAMERA_ERROR_INVALID_OPERATION;
        } else {
@@ -729,7 +734,7 @@ static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
        char *msg = NULL;
 
        if (!cb_info || !param) {
-               LOGE("invalid pointer : api %d - %p %p", api, cb_info, param);
+               CAM_LOG_ERROR("invalid pointer : api %d - %p %p", api, cb_info, param);
 
                if (ret)
                        *ret = CAMERA_ERROR_INVALID_PARAMETER;
@@ -737,7 +742,7 @@ static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
                return;
        }
 
-       /*LOGD("type %d, name %s", param->type, param->name);*/
+       CAM_LOG_DEBUG("type[%d], name[%s]", param->type, param->name);
 
        switch (param->type) {
        case MUSE_TYPE_INT:
@@ -759,12 +764,12 @@ static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
                        NULL);
                break;
        default:
-               LOGE("unknown type %d", param->type);
+               CAM_LOG_ERROR("unknown type %d", param->type);
                break;
        }
 
        if (!msg) {
-               LOGE("msg failed: api %d", api);
+               CAM_LOG_ERROR("msg failed: api %d", api);
 
                if (ret)
                        *ret = CAMERA_ERROR_OUT_OF_MEMORY;
@@ -772,7 +777,7 @@ static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
                return;
        }
 
-       /*LOGD("send msg %s", msg);*/
+       CAM_LOG_DEBUG("send msg[%s]", msg);
 
        if (cb_info->is_server_connected) {
                __camera_update_api_waiting(cb_info, api, 1);
@@ -783,7 +788,7 @@ static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
        }
 
        if (send_ret < 0) {
-               LOGE("msg send failed");
+               CAM_LOG_ERROR("msg send failed");
 
                if (ret)
                        *ret = CAMERA_ERROR_INVALID_OPERATION;
@@ -808,28 +813,28 @@ static void _camera_msg_send_param2_int(int api, camera_cb_info_s *cb_info,
        char *msg = NULL;
 
        if (!cb_info || !param0 || !param1) {
-               LOGE("invalid ptr %p %p %p : api %d",
+               CAM_LOG_ERROR("invalid ptr %p %p %p : api %d",
                        cb_info, param0, param1, api);
                func_ret = CAMERA_ERROR_INVALID_PARAMETER;
                goto _SEND_PARAM2_INT_DONE;
        }
 
-       /*LOGD("api %d, param0 [%s:%d], param1 [%s:%d]",
+       CAM_LOG_DEBUG("api[%d], param0[%s:%d], param1[%s:%d]",
                api,
                param0->name, param0->value.value_INT,
-               param1->name, param1->value.value_INT);*/
+               param1->name, param1->value.value_INT);
 
        msg = muse_core_msg_new(api,
                param0->type, param0->name, param0->value.value_INT,
                param1->type, param1->name, param1->value.value_INT,
                NULL);
        if (!msg) {
-               LOGE("msg failed: api %d", api);
+               CAM_LOG_ERROR("msg failed: api %d", api);
                func_ret = CAMERA_ERROR_OUT_OF_MEMORY;
                goto _SEND_PARAM2_INT_DONE;
        }
 
-       /*LOGD("send msg [%s]", msg);*/
+       CAM_LOG_DEBUG("send msg[%s]", msg);
 
        if (cb_info->is_server_connected) {
                __camera_update_api_waiting(cb_info, api, 1);
@@ -840,7 +845,7 @@ static void _camera_msg_send_param2_int(int api, camera_cb_info_s *cb_info,
        }
 
        if (send_ret < 0) {
-               LOGE("msg send failed");
+               CAM_LOG_ERROR("msg send failed");
 
                func_ret = CAMERA_ERROR_INVALID_OPERATION;
        } else {
@@ -864,7 +869,7 @@ static void _camera_msg_return_buffer(int ret_fd, camera_cb_info_s *cb_info)
        camera_msg_param param;
 
        if (ret_fd < 0) {
-               LOGW("invalid fd %d", ret_fd);
+               CAM_LOG_WARNING("invalid fd %d", ret_fd);
                return;
        }
 
@@ -881,7 +886,7 @@ int _camera_get_tbm_surface_format(int in_format, uint32_t *out_format)
        if (in_format <= MM_PIXEL_FORMAT_INVALID ||
            in_format >= MM_PIXEL_FORMAT_NUM ||
            out_format == NULL) {
-               LOGE("INVALID_PARAMETER : in_format %d, out_format ptr %p", in_format, out_format);
+               CAM_LOG_ERROR("INVALID_PARAMETER : in_format %d, out_format ptr %p", in_format, out_format);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -926,7 +931,7 @@ int _camera_get_tbm_surface_format(int in_format, uint32_t *out_format)
                *out_format = TBM_FORMAT_ARGB8888;
                break;
        default:
-               LOGE("invalid in_format %d", in_format);
+               CAM_LOG_ERROR("invalid in_format %d", in_format);
                return CAMERA_ERROR_INVALID_PARAMETER;
 //LCOV_EXCL_STOP
        }
@@ -940,7 +945,7 @@ int _camera_get_media_packet_mimetype(int in_format, media_format_mimetype_e *mi
        if (in_format <= MM_PIXEL_FORMAT_INVALID ||
            in_format >= MM_PIXEL_FORMAT_NUM ||
            mimetype == NULL) {
-               LOGE("INVALID_PARAMETER : in_format %d, mimetype ptr %p", in_format, mimetype);
+               CAM_LOG_ERROR("INVALID_PARAMETER : in_format %d, mimetype ptr %p", in_format, mimetype);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -985,7 +990,7 @@ int _camera_get_media_packet_mimetype(int in_format, media_format_mimetype_e *mi
                *mimetype = MEDIA_FORMAT_ARGB;
                break;
        default:
-               LOGE("invalid in_format %d", in_format);
+               CAM_LOG_ERROR("invalid in_format %d", in_format);
                return CAMERA_ERROR_INVALID_PARAMETER;
 //LCOV_EXCL_STOP
        }
@@ -1000,7 +1005,7 @@ void camera_create_preview_frame(camera_stream_data_s *stream, int num_buffer_fd
        unsigned char *buf_pos = NULL;
 
        if (stream == NULL || buffer_bo_handle == NULL || frame == NULL) {
-               LOGE("invalid parameter - stream:%p, buffer_bo_handle:%p", stream, buffer_bo_handle);
+               CAM_LOG_ERROR("invalid parameter - stream:%p, buffer_bo_handle:%p", stream, buffer_bo_handle);
                return;
        }
 
@@ -1019,7 +1024,7 @@ void camera_create_preview_frame(camera_stream_data_s *stream, int num_buffer_fd
 //LCOV_EXCL_START
                /* non-zero copy */
                if (!data_bo_handle || !data_bo_handle->ptr) {
-                       LOGE("NULL pointer");
+                       CAM_LOG_ERROR("NULL pointer");
                        return;
                }
 
@@ -1121,10 +1126,8 @@ void camera_create_preview_frame(camera_stream_data_s *stream, int num_buffer_fd
                }
        }
 
-       /*
-       LOGD("format %d, %dx%d, size %d plane num %d",
-            frame.format, frame.width, frame.height, total_size, frame.num_of_planes);
-       */
+       CAM_LOG_DEBUG("format[%d], res[%dx%d], size[%d], plane num[%d]",
+            frame->format, frame->width, frame->height, total_size, frame->num_of_planes);
 
        return;
 }
@@ -1137,7 +1140,7 @@ static int _camera_media_packet_data_create(int ret_fd, int *tfd, int num_buffer
        camera_media_packet_data *tmp_mp_data = NULL;
 
        if (!tfd) {
-               LOGE("NULL tfd");
+               CAM_LOG_ERROR("NULL tfd");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -1149,25 +1152,34 @@ static int _camera_media_packet_data_create(int ret_fd, int *tfd, int num_buffer
                        tmp_mp_data->num_buffer_fd = num_buffer_fd;
                        tmp_mp_data->bo = bo;
 
+                       CAM_LOG_VERBOSE("tfd[%d], ret fd[%d]", tmp_mp_data->fd, tmp_mp_data->ret_fd);
+
                        if (data_bo) {
                                /* non-zero copy */
                                tmp_mp_data->data_bo = data_bo;
                                tmp_mp_data->data_fd = tfd[1];
+
+                               CAM_LOG_VERBOSE("bo[%p], fd[%d]",
+                                       tmp_mp_data->data_bo, tmp_mp_data->data_fd);
                        } else {
                                /* zero copy */
                                for (i = 0 ; i < num_buffer_fd ; i++) {
                                        tmp_mp_data->buffer_bo[i] = buffer_bo[i];
                                        tmp_mp_data->buffer_fd[i] = (tbm_fd)tfd[i + 1];
+
+                                       CAM_LOG_VERBOSE("    [%d] bo[%p], fd[%d]",
+                                               i, tmp_mp_data->buffer_bo[i], tmp_mp_data->buffer_fd[i]);
                                }
                        }
 
                        tmp_mp_data->ref_cnt++;
 
                        *mp_data = tmp_mp_data;
-                       /*LOGD("mp_data %p", tmp_mp_data);*/
+
+                       CAM_LOG_DEBUG("mp_data %p", tmp_mp_data);
                } else {
                        ret = CAMERA_ERROR_OUT_OF_MEMORY;
-                       LOGE("failed to alloc media packet data");
+                       CAM_LOG_ERROR("failed to alloc media packet data");
                }
        } else {
                ((camera_media_packet_data *)*mp_data)->ref_cnt++;
@@ -1181,14 +1193,16 @@ static void _camera_media_packet_data_release(camera_media_packet_data *mp_data,
        int i = 0;
 
        if (!mp_data || !cb_info) {
-               LOGE("NULL pointer %p %p", mp_data, cb_info);
+               CAM_LOG_ERROR("NULL pointer %p %p", mp_data, cb_info);
                return;
        }
 
        if (mp_data->ref_cnt > 1) {
                mp_data->ref_cnt--;
-               LOGD("ref count %d", mp_data->ref_cnt);
+               CAM_LOG_INFO("ref count %d", mp_data->ref_cnt);
        } else {
+               CAM_LOG_VERBOSE("tfd[%d], ret fd[%d]", mp_data->fd, mp_data->ret_fd);
+
                /* release imported bo and close imported fd */
                for (i = 0 ; i < mp_data->num_buffer_fd ; i++) {
                        tbm_bo_unref(mp_data->buffer_bo[i]);
@@ -1201,6 +1215,7 @@ static void _camera_media_packet_data_release(camera_media_packet_data *mp_data,
                /* unref tbm bo and close imported fd */
                close(mp_data->fd);
                mp_data->fd = -1;
+
                _camera_release_imported_bo(&mp_data->bo);
 
                if (mp_data->data_bo && mp_data->data_fd >= 0) {
@@ -1233,7 +1248,7 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
        tbm_bo *buffer_bo = NULL;
 
        if (cb_info == NULL || stream == NULL || mp_data == NULL || packet == NULL) {
-               LOGE("invalid parameter - cb_info:%p, stream:%p, mp_data:%p, packet:%p",
+               CAM_LOG_ERROR("invalid parameter - cb_info:%p, stream:%p, mp_data:%p, packet:%p",
                        cb_info, stream, mp_data, packet);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
@@ -1327,7 +1342,6 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
                        tsurf = tbm_surface_internal_create_with_bos(&tsurf_info, &mp_data->data_bo, 1);
 //LCOV_EXCL_STOP
                }
-               /*LOGD("tbm surface %p", tsurf);*/
        }
 
        if (tsurf) {
@@ -1338,10 +1352,13 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
                        media_format_mimetype_e pkt_fmt_mimetype = MEDIA_FORMAT_NV12;
 
                        media_format_get_video_info(cb_info->pkt_fmt, &pkt_fmt_mimetype, &pkt_fmt_width, &pkt_fmt_height, NULL, NULL);
+
+                       CAM_LOG_INFO("pkt_fmt %dx%d - stream %dx%d", pkt_fmt_width, pkt_fmt_height, stream->width, stream->height);
+
                        if (pkt_fmt_mimetype != mimetype ||
                            pkt_fmt_width != stream->width ||
                            pkt_fmt_height != stream->height) {
-                               LOGW("change fmt: current 0x%x, %dx%d",
+                               CAM_LOG_WARNING("change fmt: current 0x%x, %dx%d",
                                     pkt_fmt_mimetype, pkt_fmt_width, pkt_fmt_height);
                                media_format_unref(cb_info->pkt_fmt);
                                cb_info->pkt_fmt = NULL;
@@ -1353,15 +1370,15 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
 
                /* create packet format */
                if (make_pkt_fmt) {
-                       LOGW("make new pkt_fmt - 0x%x, %dx%d", mimetype, stream->width, stream->height);
+                       CAM_LOG_WARNING("make new pkt_fmt - 0x%x, %dx%d", mimetype, stream->width, stream->height);
                        ret = media_format_create(&cb_info->pkt_fmt);
                        if (ret == MEDIA_FORMAT_ERROR_NONE) {
                                ret = media_format_set_video_mime(cb_info->pkt_fmt, mimetype);
                                ret |= media_format_set_video_width(cb_info->pkt_fmt, stream->width);
                                ret |= media_format_set_video_height(cb_info->pkt_fmt, stream->height);
-                               LOGW("media_format_set : 0x%x", ret);
+                               CAM_LOG_WARNING("media_format_set : 0x%x", ret);
                        } else {
-                               LOGW("media_format_create failed 0x%x", ret);
+                               CAM_LOG_WARNING("media_format_create failed 0x%x", ret);
                        }
                }
 
@@ -1370,21 +1387,20 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
                        tsurf, (media_packet_finalize_cb)_camera_media_packet_finalize,
                        (void *)cb_info, &pkt);
                if (ret != MEDIA_PACKET_ERROR_NONE) {
-                       LOGE("media_packet_create failed 0x%x", ret);
+                       CAM_LOG_ERROR("media_packet_create failed 0x%x", ret);
                        tbm_surface_destroy(tsurf);
                        tsurf = NULL;
                }
        } else {
-               LOGE("tbm surface failed. %dx%d, format %d, num_buffer_fd %d, data_bo %p",
+               CAM_LOG_ERROR("tbm surface failed. %dx%d, format %d, num_buffer_fd %d, data_bo %p",
                        stream->width, stream->height, stream->format, num_buffer_fd, mp_data->data_bo);
        }
 
        if (pkt) {
-               /*LOGD("media packet %p, internal buffer %p", pkt, stream->internal_buffer);*/
                /* set media packet data */
                ret = media_packet_set_extra(pkt, (void *)mp_data);
                if (ret != MEDIA_PACKET_ERROR_NONE) {
-                       LOGE("media_packet_set_extra failed");
+                       CAM_LOG_ERROR("media_packet_set_extra failed");
 
                        _camera_media_packet_data_release(mp_data, cb_info);
 
@@ -1392,7 +1408,7 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
                } else {
                        /* set timestamp : msec -> nsec */
                        if (media_packet_set_pts(pkt, (uint64_t)(stream->timestamp) * 1000000) != MEDIA_PACKET_ERROR_NONE)
-                               LOGW("media_packet_set_pts failed");
+                               CAM_LOG_WARNING("media_packet_set_pts failed");
 
                        *packet = pkt;
                }
@@ -1409,17 +1425,17 @@ int _camera_media_packet_finalize(media_packet_h pkt, int error_code, void *user
        tbm_surface_h tsurf = NULL;
 
        if (!pkt || !cb_info) {
-               LOGE("NULL pointer %p %p", pkt, cb_info);
+               CAM_LOG_ERROR("NULL pointer %p %p", pkt, cb_info);
                return MEDIA_PACKET_FINALIZE;
        }
 
        ret = media_packet_get_extra(pkt, (void **)&mp_data);
        if (ret != MEDIA_PACKET_ERROR_NONE) {
-               LOGE("media_packet_get_extra failed 0x%x", ret);
+               CAM_LOG_ERROR("media_packet_get_extra failed 0x%x", ret);
                return MEDIA_PACKET_FINALIZE;
        }
 
-       /*LOGD("mp_data %p", mp_data);*/
+       CAM_LOG_VERBOSE("mp_data[%p]", mp_data);
 
        g_mutex_lock(&cb_info->mp_data_mutex);
 
@@ -1430,7 +1446,7 @@ int _camera_media_packet_finalize(media_packet_h pkt, int error_code, void *user
 
        ret = media_packet_get_tbm_surface(pkt, &tsurf);
        if (ret != MEDIA_PACKET_ERROR_NONE)
-               LOGE("get tbm_surface failed 0x%x", ret);
+               CAM_LOG_ERROR("get tbm_surface failed 0x%x", ret);
 
        if (tsurf) {
                tbm_surface_destroy(tsurf);
@@ -1446,11 +1462,11 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
        int param2 = 0;
 
        if (!recv_msg || event >= MUSE_CAMERA_EVENT_TYPE_NUM) {
-               LOGE("invalid parameter - camera msg %p, event %d", recv_msg, event);
+               CAM_LOG_ERROR("invalid parameter - camera msg %p, event %d", recv_msg, event);
                return;
        }
 
-       /*LOGD("get camera msg %s, event %d", recv_msg, event);*/
+       CAM_LOG_DEBUG("get camera msg[%s], event[%d]", recv_msg, event);
 
        g_mutex_lock(&cb_info->user_cb_mutex[event]);
 
@@ -1460,7 +1476,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                        event != MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION &&
                        event != MUSE_CAMERA_EVENT_TYPE_CAPTURE) {
                        g_mutex_unlock(&cb_info->user_cb_mutex[event]);
-                       LOGW("NULL callback for event %d, return here", event);
+                       CAM_LOG_WARNING("NULL callback for event %d, return here", event);
                        return;
                }
 
@@ -1483,7 +1499,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                        muse_camera_msg_get(current, recv_msg);
                        muse_camera_msg_get(by_policy, recv_msg);
 
-                       LOGD("STATE CHANGE - previous %d, current %d, by_policy %d",
+                       CAM_LOG_INFO("STATE CHANGE - previous %d, current %d, by_policy %d",
                                previous, current, by_policy);
 
                        ((camera_state_changed_cb)cb_info->user_cb[event])((camera_state_e)previous,
@@ -1496,13 +1512,13 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
 
                        muse_camera_msg_get(state, recv_msg);
 
-                       LOGD("FOCUS state - %d", state);
+                       CAM_LOG_INFO("FOCUS state - %d", state);
 
                        ((camera_focus_changed_cb)cb_info->user_cb[event])((camera_focus_state_e)state, cb_info->user_data[event]);
                }
                break;
        case MUSE_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE:
-               LOGD("CAPTURE_COMPLETED");
+               CAM_LOG_INFO("CAPTURE_COMPLETED");
                ((camera_capture_completed_cb)cb_info->user_cb[event])(cb_info->user_data[event]);
                break;
        case MUSE_CAMERA_EVENT_TYPE_PREVIEW:
@@ -1516,7 +1532,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
 
                        muse_camera_msg_get(percent, recv_msg);
 
-                       LOGD("HDR progress - %d %%", percent);
+                       CAM_LOG_INFO("HDR progress - %d %%", percent);
 
                        ((camera_attr_hdr_progress_cb)cb_info->user_cb[event])(percent, cb_info->user_data[event]);
                }
@@ -1531,7 +1547,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                        muse_camera_msg_get(previous, recv_msg);
                        muse_camera_msg_get(current, recv_msg);
 
-                       LOGW("INTERRUPTED - policy %d, state %d -> %d", policy, previous, current);
+                       CAM_LOG_WARNING("INTERRUPTED - policy %d, state %d -> %d", policy, previous, current);
 
                        ((camera_interrupted_cb)cb_info->user_cb[event])((camera_policy_e)policy,
                                (camera_state_e)previous, (camera_state_e)current, cb_info->user_data[event]);
@@ -1545,7 +1561,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                        muse_camera_msg_get(policy, recv_msg);
                        muse_camera_msg_get(state, recv_msg);
 
-                       LOGW("INTERRUPT_STARTED - policy %d, state %d", policy, state);
+                       CAM_LOG_WARNING("INTERRUPT_STARTED - policy %d, state %d", policy, state);
 
                        ((camera_interrupt_started_cb)cb_info->user_cb[event])((camera_policy_e)policy,
                                (camera_state_e)state, cb_info->user_data[event]);
@@ -1562,7 +1578,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                        muse_camera_msg_get(error, recv_msg);
                        muse_camera_msg_get(current_state, recv_msg);
 
-                       LOGE("ERROR - error 0x%x, current_state %d", error, current_state);
+                       CAM_LOG_ERROR("ERROR - error 0x%x, current_state %d", error, current_state);
 
                        ((camera_error_cb)cb_info->user_cb[event])((camera_error_e)error,
                                (camera_state_e)current_state, cb_info->user_data[event]);
@@ -1575,12 +1591,12 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                muse_camera_msg_get(param1, recv_msg);
                muse_camera_msg_get(param2, recv_msg);
 
-               /*LOGD("event %d SUPPORTED %d, %d", event, param1, param2);*/
+               CAM_LOG_DEBUG("event[%d] SUPPORTED[%d],[%d]", event, param1, param2);
 
                if (((camera_supported_cb_param2)cb_info->user_cb[event])(param1, param2, cb_info->user_data[event]) == false) {
                        cb_info->user_cb[event] = NULL;
                        cb_info->user_data[event] = NULL;
-                       LOGW("stop foreach callback for event %d", event);
+                       CAM_LOG_WARNING("stop foreach callback for event %d", event);
                }
                break;
        case MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT:
@@ -1615,12 +1631,12 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
        case MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE:
                muse_camera_msg_get(param1, recv_msg);
 
-               /*LOGD("event %d SUPPORTED %d ", event, param1);*/
+               CAM_LOG_DEBUG("event[%d], SUPPORTED[%d] ", event, param1);
 
                if (((camera_supported_cb_param1)cb_info->user_cb[event])(param1, cb_info->user_data[event]) == false) {
                        cb_info->user_cb[event] = NULL;
                        cb_info->user_data[event] = NULL;
-                       LOGW("stop foreach callback for event %d", event);
+                       CAM_LOG_WARNING("stop foreach callback for event %d", event);
                }
                break;
 //LCOV_EXCL_STOP
@@ -1628,7 +1644,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
                __camera_event_handler_capture(cb_info, recv_msg, tfd);
                break;
        default:
-               LOGW("unhandled event %d", event);
+               CAM_LOG_WARNING("unhandled event %d", event);
                break;
        }
 
@@ -1643,7 +1659,7 @@ static gboolean _camera_idle_event_callback(gpointer data)
        camera_idle_event_s *cam_idle_event = (camera_idle_event_s *)data;
 
        if (cam_idle_event == NULL) {
-               LOGE("cam_idle_event is NULL");
+               CAM_LOG_ERROR("cam_idle_event is NULL");
                return FALSE;
        }
 
@@ -1652,7 +1668,7 @@ static gboolean _camera_idle_event_callback(gpointer data)
 
        cb_info = cam_idle_event->cb_info;
        if (cb_info == NULL) {
-               LOGW("camera cb_info is NULL. event %p %d", cam_idle_event, cam_idle_event->event);
+               CAM_LOG_WARNING("camera cb_info is NULL. event %p %d", cam_idle_event, cam_idle_event->event);
                g_mutex_unlock(&g_cam_idle_event_lock);
                goto IDLE_EVENT_CALLBACK_DONE;
        }
@@ -1684,25 +1700,25 @@ static gpointer _camera_msg_handler_func(gpointer data)
        camera_cb_info_s *cb_info = NULL;
 
        if (!handler_info || !handler_info->cb_info) {
-               LOGE("NULL handler %p", handler_info);
+               CAM_LOG_ERROR("NULL handler %p", handler_info);
                return NULL;
        }
 
        cb_info = (camera_cb_info_s *)handler_info->cb_info;
        type = handler_info->type;
 
-       LOGD("t:%d start", type);
+       CAM_LOG_INFO("t:%d start", type);
 
        g_mutex_lock(&handler_info->mutex);
 
        while (g_atomic_int_get(&handler_info->running)) {
                if (g_queue_is_empty(handler_info->queue)) {
-                       /*LOGD("t:%d signal wait...", type);*/
+                       CAM_LOG_VERBOSE("t[%d] signal wait...", type);
                        g_cond_wait(&handler_info->cond, &handler_info->mutex);
-                       /*LOGD("t:%d signal received", type);*/
+                       CAM_LOG_VERBOSE("t[%d] signal received", type);
 
                        if (g_atomic_int_get(&handler_info->running) == 0) {
-                               LOGD("t:%d stop event thread", type);
+                               CAM_LOG_INFO("t:%d stop event thread", type);
                                break;
                        }
                }
@@ -1712,7 +1728,7 @@ static gpointer _camera_msg_handler_func(gpointer data)
                g_mutex_unlock(&handler_info->mutex);
 
                if (cam_msg == NULL) {
-                       LOGE("t:%d NULL message", type);
+                       CAM_LOG_ERROR("t:%d NULL message", type);
                        g_mutex_lock(&handler_info->mutex);
                        continue;
                }
@@ -1729,14 +1745,14 @@ static gpointer _camera_msg_handler_func(gpointer data)
                                        cb_info->api_ret[api] = ret;
                                        cb_info->api_activating[api] = TRUE;
 
-                                       /*LOGD("t:%d camera api %d - return 0x%x", type, api, ret);*/
+                                       CAM_LOG_DEBUG("t[%d] camera api[%d] - return[0x%x]", type, api, ret);
 
                                        g_cond_signal(&cb_info->api_cond[api]);
                                } else {
-                                       LOGW("no waiting for this api [%d]", api);
+                                       CAM_LOG_WARNING("no waiting for this api [%d]", api);
                                }
                        } else {
-                               LOGE("t:%d failed to get camera ret for api %d, msg %s", type, api, cam_msg->recv_msg);
+                               CAM_LOG_ERROR("t:%d failed to get camera ret for api %d, msg %s", type, api, cam_msg->recv_msg);
                        }
 
                        g_mutex_unlock(&cb_info->api_mutex[api]);
@@ -1748,7 +1764,7 @@ static gpointer _camera_msg_handler_func(gpointer data)
                        case MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN:
                                cam_idle_event = g_new0(camera_idle_event_s, 1);
                                if (cam_idle_event == NULL) {
-                                       LOGE("t:%d cam_idle_event alloc failed", type);
+                                       CAM_LOG_ERROR("t:%d cam_idle_event alloc failed", type);
                                        break;
                                }
 
@@ -1758,7 +1774,8 @@ static gpointer _camera_msg_handler_func(gpointer data)
                                strncpy(cam_idle_event->recv_msg, cam_msg->recv_msg, sizeof(cam_idle_event->recv_msg));
                                memcpy(cam_idle_event->tfd, cam_msg->tfd, sizeof(cam_idle_event->tfd));
 
-                               /*LOGD("t:%d add camera event[%d, %p] to IDLE", type, cam_msg->event, cam_idle_event);*/
+                               CAM_LOG_DEBUG("t[%d] add camera event[%d, %p] to IDLE",
+                                       type, cam_msg->event, cam_idle_event);
 
                                g_mutex_lock(&g_cam_idle_event_lock);
                                cb_info->idle_event_list = g_list_append(cb_info->idle_event_list, (gpointer)cam_idle_event);
@@ -1770,11 +1787,11 @@ static gpointer _camera_msg_handler_func(gpointer data)
                                        NULL);
                                break;
                        default:
-                               LOGE("t:%d not handled event class %d", type, cam_msg->event_class);
+                               CAM_LOG_ERROR("t:%d not handled event class %d", type, cam_msg->event_class);
                                break;
                        }
                } else {
-                       LOGE("t:%d unknown camera api[%d] message[%s]", type, api, cam_msg->recv_msg);
+                       CAM_LOG_ERROR("t:%d unknown camera api[%d] message[%s]", type, api, cam_msg->recv_msg);
                }
 
                g_free(cam_msg);
@@ -1787,17 +1804,17 @@ static gpointer _camera_msg_handler_func(gpointer data)
        while (!g_queue_is_empty(handler_info->queue)) {
                cam_msg = (camera_message_s *)g_queue_pop_head(handler_info->queue);
                if (cam_msg) {
-                       LOGD("t:%d remove camera message %p", type, cam_msg);
+                       CAM_LOG_INFO("t:%d remove camera message %p", type, cam_msg);
                        free(cam_msg);
                        cam_msg = NULL;
                } else {
-                       LOGW("t:%d NULL camera message", type);
+                       CAM_LOG_WARNING("t:%d NULL camera message", type);
                }
        }
 
        g_mutex_unlock(&handler_info->mutex);
 
-       LOGD("t:%d return", type);
+       CAM_LOG_INFO("t:%d return", type);
 
        return NULL;
 }
@@ -1809,14 +1826,14 @@ static void _camera_deactivate_idle_event_all(camera_cb_info_s *cb_info)
        GList *list = NULL;
 
        if (cb_info == NULL) {
-               LOGE("cb_info is NULL");
+               CAM_LOG_ERROR("cb_info is NULL");
                return;
        }
 
        g_mutex_lock(&g_cam_idle_event_lock);
 
        if (cb_info->idle_event_list == NULL) {
-               LOGD("No remained idle event");
+               CAM_LOG_INFO("No remained idle event");
                g_mutex_unlock(&g_cam_idle_event_lock);
                return;
        }
@@ -1828,12 +1845,12 @@ static void _camera_deactivate_idle_event_all(camera_cb_info_s *cb_info)
                list = g_list_next(list);
 
                if (!cam_idle_event) {
-                       LOGW("Fail to remove idle event. The event is NULL");
+                       CAM_LOG_WARNING("Fail to remove idle event. The event is NULL");
                        continue;
                }
 
                if (g_idle_remove_by_data(cam_idle_event)) {
-                       LOGW("remove idle event %p done", cam_idle_event);
+                       CAM_LOG_WARNING("remove idle event %p done", cam_idle_event);
 
                        cb_info->idle_event_list = g_list_remove(cb_info->idle_event_list, (gpointer)cam_idle_event);
 
@@ -1843,7 +1860,7 @@ static void _camera_deactivate_idle_event_all(camera_cb_info_s *cb_info)
                        continue;
                }
 
-               LOGW("set NULL cb_info for event %p %d, it will be freed on idle callback",
+               CAM_LOG_WARNING("set NULL cb_info for event %p %d, it will be freed on idle callback",
                        cam_idle_event, cam_idle_event->event);
 
                cam_idle_event->cb_info = NULL;
@@ -1865,13 +1882,13 @@ static void __camera_add_msg_to_queue(camera_cb_info_s *cb_info, int api, int ev
        camera_message_s *cam_msg = NULL;
 
        if (!cb_info || !msg) {
-               LOGE("NULL pointer %p %p", cb_info, msg);
+               CAM_LOG_ERROR("NULL pointer %p %p", cb_info, msg);
                return;
        }
 
        cam_msg = g_new0(camera_message_s, 1);
        if (!cam_msg) {
-               LOGE("failed to alloc cam_msg for [%s]", msg);
+               CAM_LOG_ERROR("failed to alloc cam_msg for [%s]", msg);
                return;
        }
 
@@ -1884,7 +1901,8 @@ static void __camera_add_msg_to_queue(camera_cb_info_s *cb_info, int api, int ev
 
        strncpy(cam_msg->recv_msg, msg, sizeof(cam_msg->recv_msg) - 1);
 
-       /*LOGD("add camera message to queue : api %d, event %d, event_class %d", api, event, event_class);*/
+       CAM_LOG_DEBUG("add message to queue : api[%d], event[%d], event_class[%d]",
+               api, event, event_class);
 
        if (event == MUSE_CAMERA_EVENT_TYPE_PREVIEW) {
                g_mutex_lock(&cb_info->preview_cb_info.mutex);
@@ -1920,38 +1938,38 @@ static void __camera_process_msg(camera_cb_info_s *cb_info, char *msg, int *tfd)
        int get_index = -1;
 
        if (!cb_info || !msg) {
-               LOGE("invalid ptr %p %p", cb_info, msg);
+               CAM_LOG_ERROR("invalid ptr %p %p", cb_info, msg);
                return;
        }
 
-       /*LOGD("msg [%s]", msg);*/
+       CAM_LOG_DEBUG("msg[%s]", msg);
 
        if (!muse_camera_msg_get(api, msg)) {
-               LOGE("failed to get camera api");
+               CAM_LOG_ERROR("failed to get camera api");
                return;
        }
 
        if (api == MUSE_CAMERA_CB_EVENT) {
                if (!muse_camera_msg_get(event, msg) ||
                        !muse_camera_msg_get(event_class, msg)) {
-                       LOGE("failed to get camera event or event_class [%s]", msg);
+                       CAM_LOG_ERROR("failed to get camera event or event_class [%s]", msg);
                        return;
                }
        } else {
                if (!muse_camera_msg_get(api_class, msg)) {
-                       LOGE("failed to get camera api_class [%s]", msg);
+                       CAM_LOG_ERROR("failed to get camera api_class [%s]", msg);
                        return;
                }
        }
 
        if (api_class == MUSE_CAMERA_API_CLASS_IMMEDIATE) {
                if (api >= MUSE_CAMERA_API_MAX) {
-                       LOGE("invalid api %d", api);
+                       CAM_LOG_ERROR("invalid api %d", api);
                        return;
                }
 
                if (!muse_camera_msg_get(ret, msg)) {
-                       LOGE("failed to get camera ret");
+                       CAM_LOG_ERROR("failed to get camera ret");
                        return;
                }
 
@@ -1961,13 +1979,13 @@ static void __camera_process_msg(camera_cb_info_s *cb_info, char *msg, int *tfd)
                case MUSE_CAMERA_API_CREATE:
                        if (ret != CAMERA_ERROR_NONE) {
                                g_atomic_int_set(&cb_info->msg_recv_running, 0);
-                               LOGE("camera create error 0x%x. close client cb handler", ret);
+                               CAM_LOG_ERROR("camera create error 0x%x. close client cb handler", ret);
                        }
                        break;
                case MUSE_CAMERA_API_DESTROY:
                        if (ret == CAMERA_ERROR_NONE) {
                                g_atomic_int_set(&cb_info->msg_recv_running, 0);
-                               LOGD("camera destroy done. close client cb handler");
+                               CAM_LOG_INFO("camera destroy done. close client cb handler");
                        }
                        break;
                default:
@@ -1988,7 +2006,7 @@ static void __camera_process_msg(camera_cb_info_s *cb_info, char *msg, int *tfd)
                                        if (api == MUSE_CAMERA_API_GET_DISPLAY_ROI_AREA) {
                                                muse_core_msg_deserialize("get_value",
                                                        msg, NULL, NULL, MUSE_TYPE_ARRAY, cb_info->get_display_roi_area);
-                                               LOGD("get display roi %d,%d,%dx%d",
+                                               CAM_LOG_INFO("get display roi %d,%d,%dx%d",
                                                        cb_info->get_display_roi_area[0],
                                                        cb_info->get_display_roi_area[1],
                                                        cb_info->get_display_roi_area[2],
@@ -1996,7 +2014,7 @@ static void __camera_process_msg(camera_cb_info_s *cb_info, char *msg, int *tfd)
                                        } else {
                                                muse_core_msg_deserialize("get_value",
                                                        msg, NULL, NULL, MUSE_TYPE_ARRAY, cb_info->get_geotag);
-                                               LOGD("get geotag %lf, %lf, %lf",
+                                               CAM_LOG_INFO("get geotag %lf, %lf, %lf",
                                                        cb_info->get_geotag[0], cb_info->get_geotag[1], cb_info->get_geotag[2]);
                                        }
                                        break;
@@ -2004,7 +2022,7 @@ static void __camera_process_msg(camera_cb_info_s *cb_info, char *msg, int *tfd)
                                        muse_core_msg_deserialize("get_value", msg, NULL, NULL, MUSE_TYPE_STRING, cb_info->get_string[get_index]);
                                        break;
                                default:
-                                       LOGW("unknown type %d", get_type);
+                                       CAM_LOG_WARNING("unknown type %d", get_type);
                                        break;
                                }
                        }
@@ -2017,14 +2035,14 @@ static void __camera_process_msg(camera_cb_info_s *cb_info, char *msg, int *tfd)
 
                        g_cond_signal(&cb_info->api_cond[api]);
                } else {
-                       LOGW("no waiting for this api [%d]", api);
+                       CAM_LOG_WARNING("no waiting for this api [%d]", api);
                }
 
                g_mutex_unlock(&cb_info->api_mutex[api]);
        } else if (api_class == MUSE_CAMERA_API_CLASS_THREAD_SUB || api == MUSE_CAMERA_CB_EVENT) {
                __camera_add_msg_to_queue(cb_info, api, event, event_class, msg, tfd);
        } else {
-               LOGW("unknown camera api %d, class %d", api, api_class);
+               CAM_LOG_WARNING("unknown camera api %d, class %d", api, api_class);
        }
 
        return;
@@ -2040,11 +2058,11 @@ static gpointer _camera_msg_recv_func(gpointer data)
        camera_cb_info_s *cb_info = (camera_cb_info_s *)data;
 
        if (!cb_info) {
-               LOGE("cb_info NULL");
+               CAM_LOG_ERROR("cb_info NULL");
                return NULL;
        }
 
-       LOGD("start - fd : %d", cb_info->fd);
+       CAM_LOG_INFO("start - fd : %d", cb_info->fd);
 
        recv_msg = cb_info->recv_msg;
 
@@ -2055,34 +2073,32 @@ static gpointer _camera_msg_recv_func(gpointer data)
                recv_length = muse_core_msg_recv_fd(cb_info->fd, recv_msg, MUSE_MSG_MAX_LENGTH, tfd);
                if (recv_length <= 0) {
                        cb_info->is_server_connected = FALSE;
-                       LOGE("receive msg failed - server disconnected");
+                       CAM_LOG_ERROR("receive msg failed - server disconnected");
                        break;
                }
 
-               /*
                if (tfd[0] >= 0)
-                       LOGD("%d %d %d %d", tfd[0], tfd[1], tfd[2], tfd[3]);
-               */
+                       CAM_LOG_DEBUG("tfd[%d/%d/%d/%d]", tfd[0], tfd[1], tfd[2], tfd[3]);
 
                recv_msg[recv_length] = '\0';
 
-               /*LOGD("recv msg : %s, length : %d", recv_msg, recv_length);*/
+               CAM_LOG_VERBOSE("recv msg[%s], length[%d]", recv_msg, recv_length);
 
                __camera_process_msg(cb_info, recv_msg, tfd);
        }
 
-       LOGD("client cb exit - server connected %d", cb_info->is_server_connected);
+       CAM_LOG_INFO("client cb exit - server connected %d", cb_info->is_server_connected);
 
        if (!cb_info->is_server_connected) {
                char *error_msg = NULL;
 
                if (cb_info->bufmgr == NULL) {
-                       LOGE("No need to send error(handle is not created)");
+                       CAM_LOG_ERROR("No need to send error(handle is not created)");
                        return NULL;
                }
 
                if (cb_info->fd < 0) {
-                       LOGE("fd is closed in client side");
+                       CAM_LOG_ERROR("fd is closed in client side");
                        return NULL;
                }
 
@@ -2093,7 +2109,7 @@ static gpointer _camera_msg_recv_func(gpointer data)
                        NULL);
 
                if (!error_msg) {
-                       LOGE("error_msg failed");
+                       CAM_LOG_ERROR("error_msg failed");
                        return NULL;
                }
 
@@ -2107,7 +2123,7 @@ static gpointer _camera_msg_recv_func(gpointer data)
                muse_core_msg_free(error_msg);
                error_msg = NULL;
 
-               LOGE("add error msg for service disconnection done");
+               CAM_LOG_ERROR("add error msg for service disconnection done");
        }
 
        return NULL;
@@ -2118,17 +2134,17 @@ static bool __create_msg_handler_thread(camera_msg_handler_info_s *handler_info,
        int type, const char *thread_name, camera_cb_info_s *cb_info)
 {
        if (!handler_info || !thread_name || !cb_info) {
-               LOGE("t:%d NULL %p %p %p",
+               CAM_LOG_ERROR("t:%d NULL %p %p %p",
                        type, handler_info, thread_name, cb_info);
                return false;
        }
 
-       LOGD("t:%d", type);
+       CAM_LOG_INFO("t:%d", type);
 
        handler_info->type = type;
        handler_info->queue = g_queue_new();
        if (handler_info->queue == NULL) {
-               LOGE("t:%d queue failed", type);
+               CAM_LOG_ERROR("t:%d queue failed", type);
                return false;
        }
 
@@ -2141,7 +2157,7 @@ static bool __create_msg_handler_thread(camera_msg_handler_info_s *handler_info,
        handler_info->thread = g_thread_try_new(thread_name,
                _camera_msg_handler_func, (gpointer)handler_info, NULL);
        if (handler_info->thread == NULL) {
-               LOGE("t:%d thread failed", type);
+               CAM_LOG_ERROR("t:%d thread failed", type);
 
                g_mutex_clear(&handler_info->mutex);
                g_cond_clear(&handler_info->cond);
@@ -2151,7 +2167,7 @@ static bool __create_msg_handler_thread(camera_msg_handler_info_s *handler_info,
                return false;
        }
 
-       LOGD("t:%d done", type);
+       CAM_LOG_INFO("t:%d done", type);
 
        return true;
 }
@@ -2162,18 +2178,18 @@ static void __destroy_msg_handler_thread(camera_msg_handler_info_s *handler_info
        int type = 0;
 
        if (!handler_info) {
-               LOGE("NULL handler");
+               CAM_LOG_ERROR("NULL handler");
                return;
        }
 
        if (!handler_info->thread) {
-               LOGW("thread is not created");
+               CAM_LOG_WARNING("thread is not created");
                return;
        }
 
        type = handler_info->type;
 
-       LOGD("t:%d thread %p", type, handler_info->thread);
+       CAM_LOG_INFO("t:%d thread %p", type, handler_info->thread);
 
        g_mutex_lock(&handler_info->mutex);
        g_atomic_int_set(&handler_info->running, 0);
@@ -2188,7 +2204,7 @@ static void __destroy_msg_handler_thread(camera_msg_handler_info_s *handler_info
        g_queue_free(handler_info->queue);
        handler_info->queue = NULL;
 
-       LOGD("t:%d done", type);
+       CAM_LOG_INFO("t:%d done", type);
 
        return;
 }
@@ -2203,7 +2219,7 @@ static camera_cb_info_s *_camera_client_callback_new(gint sockfd)
 
        cb_info = g_new0(camera_cb_info_s, 1);
        if (cb_info == NULL) {
-               LOGE("cb_info failed");
+               CAM_LOG_ERROR("cb_info failed");
                goto ErrorExit;
        }
 
@@ -2223,21 +2239,21 @@ static camera_cb_info_s *_camera_client_callback_new(gint sockfd)
        /* message handler thread */
        if (!__create_msg_handler_thread(&cb_info->msg_handler_info,
                CAMERA_MESSAGE_HANDLER_TYPE_GENERAL, "camera_msg_handler", cb_info)) {
-               LOGE("msg_handler_info failed");
+               CAM_LOG_ERROR("msg_handler_info failed");
                goto ErrorExit;
        }
 
        /* message handler thread for preview callback */
        if (!__create_msg_handler_thread(&cb_info->preview_cb_info,
                CAMERA_MESSAGE_HANDLER_TYPE_PREVIEW_CB, "camera_msg_handler:preview_cb", cb_info)) {
-               LOGE("preview_cb_info failed");
+               CAM_LOG_ERROR("preview_cb_info failed");
                goto ErrorExit;
        }
 
        /* message handler thread for capture callback */
        if (!__create_msg_handler_thread(&cb_info->capture_cb_info,
                CAMERA_MESSAGE_HANDLER_TYPE_CAPTURE_CB, "camera_msg_handler:capture_cb", cb_info)) {
-               LOGE("capture_cb_info failed");
+               CAM_LOG_ERROR("capture_cb_info failed");
                goto ErrorExit;
        }
 
@@ -2249,7 +2265,7 @@ static camera_cb_info_s *_camera_client_callback_new(gint sockfd)
        cb_info->msg_recv_thread = g_thread_try_new("camera_msg_recv",
                _camera_msg_recv_func, (gpointer)cb_info, NULL);
        if (cb_info->msg_recv_thread == NULL) {
-               LOGE("message receive thread creation failed");
+               CAM_LOG_ERROR("message receive thread creation failed");
                goto ErrorExit;
        }
 
@@ -2292,12 +2308,12 @@ static void _camera_client_callback_destroy(camera_cb_info_s *cb_info)
 
        g_return_if_fail(cb_info != NULL);
 
-       LOGD("msg_recv thread[%p] destroy", cb_info->msg_recv_thread);
+       CAM_LOG_INFO("msg_recv thread[%p] destroy", cb_info->msg_recv_thread);
 
        g_thread_join(cb_info->msg_recv_thread);
        cb_info->msg_recv_thread = NULL;
 
-       LOGD("msg_recv thread removed");
+       CAM_LOG_INFO("msg_recv thread removed");
 
        /* destroy msg handler threads */
        __destroy_msg_handler_thread(&cb_info->msg_handler_info);
@@ -2347,14 +2363,14 @@ int _camera_start_evas_rendering(camera_h camera)
        camera_cli_s *pc = (camera_cli_s *)camera;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("start");
+       CAM_LOG_INFO("start");
 
        if (!CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
-               LOGE("EVAS surface is not set");
+               CAM_LOG_ERROR("EVAS surface is not set");
                return CAMERA_ERROR_NONE;
        }
 
@@ -2371,14 +2387,14 @@ int _camera_stop_evas_rendering(camera_h camera, bool keep_screen)
        camera_cli_s *pc = (camera_cli_s *)camera;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("stop - keep screen %d", keep_screen);
+       CAM_LOG_INFO("stop - keep screen %d", keep_screen);
 
        if (!CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
-               LOGE("EVAS surface is not set");
+               CAM_LOG_ERROR("EVAS surface is not set");
                return CAMERA_ERROR_NONE;
        }
 
@@ -2389,7 +2405,7 @@ int _camera_stop_evas_rendering(camera_h camera, bool keep_screen)
        if (ret == MM_ERROR_NONE) {
                ret = CAMERA_ERROR_NONE;
        } else {
-               LOGE("mm_evas_renderer_retrieve_all_packets failed 0x%x", ret);
+               CAM_LOG_ERROR("mm_evas_renderer_retrieve_all_packets failed 0x%x", ret);
                ret = CAMERA_ERROR_INVALID_OPERATION;
        }
 
@@ -2407,18 +2423,18 @@ int _camera_independent_request(int api, int device_type, const char *key, int *
 
        /* create muse connection */
        if (!key || !value) {
-               LOGE("NULL pointer");
+               CAM_LOG_ERROR("NULL pointer");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        sock_fd = muse_client_new();
        if (sock_fd < 0) {
-               LOGE("muse_client_new failed");
+               CAM_LOG_ERROR("muse_client_new failed");
                return CAMERA_ERROR_INVALID_OPERATION;
        }
 
        if (muse_client_get_module_index(MODULE_NAME, &module_index) != MM_ERROR_NONE) {
-               LOGE("muse client get module index failed");
+               CAM_LOG_ERROR("muse client get module index failed");
                ret = CAMERA_ERROR_INVALID_OPERATION;
                goto _REQUEST_EXIT;
        }
@@ -2428,7 +2444,7 @@ int _camera_independent_request(int api, int device_type, const char *key, int *
                MUSE_TYPE_INT, PARAM_DEVICE_TYPE, device_type,
                0);
        if (!msg) {
-               LOGE("msg failed");
+               CAM_LOG_ERROR("msg failed");
                ret = CAMERA_ERROR_OUT_OF_MEMORY;
                goto _REQUEST_EXIT;
        }
@@ -2439,20 +2455,20 @@ int _camera_independent_request(int api, int device_type, const char *key, int *
        msg = NULL;
 
        if (ret < 0) {
-               LOGE("send msg failed");
+               CAM_LOG_ERROR("send msg failed");
                ret = CAMERA_ERROR_INVALID_OPERATION;
                goto _REQUEST_EXIT;
        }
 
        ret = muse_core_msg_recv(sock_fd, recv_msg, MUSE_CAMERA_MSG_MAX_LENGTH);
        if (ret <= 0) {
-               LOGE("recv msg failed %d", errno);
+               CAM_LOG_ERROR("recv msg failed %d", errno);
                ret = CAMERA_ERROR_INVALID_OPERATION;
                goto _REQUEST_EXIT;
        }
 
        if (!muse_camera_msg_get(ret, recv_msg)) {
-               LOGE("failed to get return value from msg [%s]", recv_msg);
+               CAM_LOG_ERROR("failed to get return value from msg [%s]", recv_msg);
                ret = CAMERA_ERROR_INVALID_OPERATION;
                goto _REQUEST_EXIT;
        }
@@ -2460,7 +2476,7 @@ int _camera_independent_request(int api, int device_type, const char *key, int *
        if (ret == CAMERA_ERROR_NONE)
                muse_core_msg_deserialize(key, recv_msg, NULL, NULL, MUSE_TYPE_ANY, value);
 
-       LOGD("api %d - value %d", api, *value);
+       CAM_LOG_INFO("api %d - value %d", api, *value);
 
 _REQUEST_EXIT:
        if (sock_fd > -1) {
@@ -2486,19 +2502,19 @@ int camera_create(camera_device_e device, camera_h *camera)
        int device_type = (int)device;
 
        if (!camera) {
-               LOGE("NULL pointer");
+               CAM_LOG_ERROR("NULL pointer");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        sock_fd = muse_client_new();
        if (sock_fd < 0) {
-               LOGE("muse_client_new failed - returned fd %d", sock_fd);
+               CAM_LOG_ERROR("muse_client_new failed - returned fd %d", sock_fd);
                ret = CAMERA_ERROR_INVALID_OPERATION;
                goto ErrorExit;
        }
 
        if (muse_client_get_module_index(MODULE_NAME, &module_index) != MM_ERROR_NONE) {
-               LOGE("muse client get module index failed");
+               CAM_LOG_ERROR("muse client get module index failed");
                ret = CAMERA_ERROR_INVALID_OPERATION;
                goto ErrorExit;
        }
@@ -2509,7 +2525,7 @@ int camera_create(camera_device_e device, camera_h *camera)
                0);
 
        if (!send_msg) {
-               LOGE("NULL msg");
+               CAM_LOG_ERROR("NULL msg");
                ret = CAMERA_ERROR_OUT_OF_MEMORY;
                goto ErrorExit;
        }
@@ -2520,35 +2536,35 @@ int camera_create(camera_device_e device, camera_h *camera)
        send_msg = NULL;
 
        if (send_ret < 0) {
-               LOGE("send msg failed %d", errno);
+               CAM_LOG_ERROR("send msg failed %d", errno);
                ret = CAMERA_ERROR_INVALID_OPERATION;
                goto ErrorExit;
        }
 
        pc = g_new0(camera_cli_s, 1);
        if (pc == NULL) {
-               LOGE("camera_cli_s alloc failed");
+               CAM_LOG_ERROR("camera_cli_s alloc failed");
                ret = CAMERA_ERROR_OUT_OF_MEMORY;
                goto ErrorExit;
        }
 
        bufmgr = tbm_bufmgr_init(-1);
        if (bufmgr == NULL) {
-               LOGE("get tbm bufmgr failed");
+               CAM_LOG_ERROR("get tbm bufmgr failed");
                ret = CAMERA_ERROR_INVALID_OPERATION;
                goto ErrorExit;
        }
 
        pc->cb_info = _camera_client_callback_new(sock_fd);
        if (pc->cb_info == NULL) {
-               LOGE("cb_info alloc failed");
+               CAM_LOG_ERROR("cb_info alloc failed");
                ret = CAMERA_ERROR_OUT_OF_MEMORY;
                goto ErrorExit;
        }
 
        sock_fd = -1;
 
-       LOGD("cb info : %d", pc->cb_info->fd);
+       CAM_LOG_INFO("cb info : %d", pc->cb_info->fd);
 
        ret = _camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
 
@@ -2561,7 +2577,7 @@ int camera_create(camera_device_e device, camera_h *camera)
 
                muse_camera_msg_get_pointer(handle, pc->cb_info->recv_msg);
                if (handle == 0) {
-                       LOGE("Receiving Handle Failed!!");
+                       CAM_LOG_ERROR("Receiving Handle Failed!!");
                        ret = CAMERA_ERROR_INVALID_OPERATION;
                        goto ErrorExit;
                }
@@ -2569,20 +2585,24 @@ int camera_create(camera_device_e device, camera_h *camera)
                muse_camera_msg_get(preview_format, pc->cb_info->recv_msg);
                muse_camera_msg_get(user_buffer_supported, pc->cb_info->recv_msg);
 
+               g_mmcam_log_level = CAMERA_LOG_LEVEL_INFO;
+
+
+
                pc->remote_handle = handle;
                pc->cb_info->bufmgr = bufmgr;
                pc->cb_info->preview_format = preview_format;
                pc->cb_info->dp_info.type = CAMERA_DISPLAY_TYPE_NONE;
                pc->cb_info->user_buffer_supported = (gboolean)user_buffer_supported;
 
-               LOGD("default preview format %d, user buffer %d",
-                       preview_format, user_buffer_supported);
+               CAM_LOG_INFO("default preview format %d, user buffer %d, log level %d",
+                       preview_format, user_buffer_supported, g_mmcam_log_level);
 
                *camera = (camera_h)pc;
 
                /* get display interface handle */
                if (mm_display_interface_init(&pc->cb_info->dp_interface) != MM_ERROR_NONE)
-                       LOGW("display interface init failed");
+                       CAM_LOG_WARNING("display interface init failed");
        } else {
                goto ErrorExit;
        }
@@ -2619,7 +2639,7 @@ ErrorExit:
                pc = NULL;
        }
 
-       LOGE("camera create error : 0x%x", ret);
+       CAM_LOG_ERROR("camera create error : 0x%x", ret);
 
        return ret;
 //LCOV_EXCL_STOP
@@ -2635,7 +2655,7 @@ int camera_change_device(camera_h camera, camera_device_e device)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -2663,16 +2683,16 @@ int camera_destroy(camera_h camera)
        camera_cli_s *pc = (camera_cli_s *)camera;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        if (pc->cb_info->is_server_connected)
                _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
        else
-               LOGW("server disconnected. release resource without send message.");
+               CAM_LOG_WARNING("server disconnected. release resource without send message.");
 
        if (ret == CAMERA_ERROR_NONE) {
                _camera_deactivate_idle_event_all(pc->cb_info);
@@ -2683,7 +2703,7 @@ int camera_destroy(camera_h camera)
                pc = NULL;
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -2696,22 +2716,22 @@ int camera_start_preview(camera_h camera)
        camera_state_e current_state = CAMERA_STATE_NONE;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter : preview format %d, display type %d",
+       CAM_LOG_INFO("Enter : preview format %d, display type %d",
                pc->cb_info->preview_format, pc->cb_info->dp_info.type);
 
        ret = camera_get_state(camera, &current_state);
        if (ret != CAMERA_ERROR_NONE) {
-               LOGE("failed to get current state 0x%x", ret);
+               CAM_LOG_ERROR("failed to get current state 0x%x", ret);
                return ret;
        }
 
        if (pc->cb_info->preview_format == CAMERA_PIXEL_FORMAT_INVZ &&
                pc->cb_info->dp_info.type != CAMERA_DISPLAY_TYPE_NONE) {
-               LOGE("CAMERA_DISPLAY_TYPE_NONE[current %d] should be set with INVZ format",
+               CAM_LOG_ERROR("CAMERA_DISPLAY_TYPE_NONE[current %d] should be set with INVZ format",
                        pc->cb_info->dp_info.type);
                return CAMERA_ERROR_INVALID_OPERATION;
        }
@@ -2728,12 +2748,12 @@ int camera_start_preview(camera_h camera)
        if (ret == CAMERA_ERROR_NONE && CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
                ret = _camera_start_evas_rendering(camera);
                if (ret != CAMERA_ERROR_NONE) {
-                       LOGE("stop preview because of error");
+                       CAM_LOG_ERROR("stop preview because of error");
                        _camera_msg_send(MUSE_CAMERA_API_STOP_PREVIEW, NULL, pc->cb_info, NULL, 0);
                }
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -2747,17 +2767,17 @@ int camera_stop_preview(camera_h camera)
        camera_state_e current_state = CAMERA_STATE_NONE;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
 //LCOV_EXCL_START
        if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
                ret = camera_get_state(camera, &current_state);
                if (ret != CAMERA_ERROR_NONE) {
-                       LOGE("failed to get current state 0x%x", ret);
+                       CAM_LOG_ERROR("failed to get current state 0x%x", ret);
                        return ret;
                }
 
@@ -2775,11 +2795,11 @@ int camera_stop_preview(camera_h camera)
                if (pc->cb_info->user_buffer_supported)
                        _camera_release_preview_buffer(camera);
        } else if (current_state == CAMERA_STATE_PREVIEW) {
-               LOGW("restart evas rendering");
+               CAM_LOG_WARNING("restart evas rendering");
                _camera_start_evas_rendering(camera);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -2792,11 +2812,11 @@ int camera_start_capture(camera_h camera, camera_capturing_cb capturing_cb, came
        muse_camera_api_e api = MUSE_CAMERA_API_START_CAPTURE;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_CAPTURE] = capturing_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_CAPTURE] = user_data;
@@ -2806,7 +2826,7 @@ int camera_start_capture(camera_h camera, camera_capturing_cb capturing_cb, came
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -2819,20 +2839,20 @@ bool camera_is_supported_continuous_capture(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_SUPPORT_CONTINUOUS_CAPTURE;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret < 0) {
-               LOGE("error is occurred 0x%x", ret);
+               CAM_LOG_ERROR("error is occurred 0x%x", ret);
                ret = false;
        }
 
-       LOGD("ret : %d", ret);
+       CAM_LOG_INFO("ret : %d", ret);
 
        return (bool)ret;
 }
@@ -2847,11 +2867,11 @@ int camera_start_continuous_capture(camera_h camera, int count, int interval, ca
        int value = 0;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_CAPTURE] = capturing_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_CAPTURE] = user_data;
@@ -2864,7 +2884,7 @@ int camera_start_continuous_capture(camera_h camera, int count, int interval, ca
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -2877,15 +2897,15 @@ int camera_stop_continuous_capture(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_STOP_CONTINUOUS_CAPTURE;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -2898,20 +2918,20 @@ bool camera_is_supported_face_detection(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_SUPPORT_FACE_DETECTION;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret < 0) {
-               LOGE("error is occurred 0x%x", ret);
+               CAM_LOG_ERROR("error is occurred 0x%x", ret);
                ret = false;
        }
 
-       LOGD("ret : %d", ret);
+       CAM_LOG_INFO("ret : %d", ret);
 
        return (bool)ret;
 }
@@ -2924,20 +2944,20 @@ bool camera_is_supported_zero_shutter_lag(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_SUPPORT_ZERO_SHUTTER_LAG;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret < 0) {
-               LOGE("error is occurred 0x%x", ret);
+               CAM_LOG_ERROR("error is occurred 0x%x", ret);
                ret = false;
        }
 
-       LOGD("ret : %d", ret);
+       CAM_LOG_INFO("ret : %d", ret);
 
        return (bool)ret;
 }
@@ -2950,20 +2970,20 @@ bool camera_is_supported_media_packet_preview_cb(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_SUPPORT_MEDIA_PACKET_PREVIEW_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret < 0) {
-               LOGE("error is occurred 0x%x", ret);
+               CAM_LOG_ERROR("error is occurred 0x%x", ret);
                ret = false;
        }
 
-       LOGD("ret : %d", ret);
+       CAM_LOG_INFO("ret : %d", ret);
 
        return (bool)ret;
 }
@@ -2975,18 +2995,18 @@ int camera_get_device_count(camera_h camera, int *device_count)
        muse_camera_api_e api = MUSE_CAMERA_API_GET_DEVICE_COUNT;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *device_count = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_DEVICE_COUNT];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -2998,11 +3018,11 @@ int camera_start_face_detection(camera_h camera, camera_face_detected_cb callbac
        muse_camera_api_e api = MUSE_CAMERA_API_START_FACE_DETECTION;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3015,7 +3035,7 @@ int camera_start_face_detection(camera_h camera, camera_face_detected_cb callbac
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3027,11 +3047,11 @@ int camera_stop_face_detection(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_STOP_FACE_DETECTION;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3044,7 +3064,7 @@ int camera_stop_face_detection(camera_h camera)
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3056,18 +3076,18 @@ int camera_get_state(camera_h camera, camera_state_e *state)
        muse_camera_api_e api = MUSE_CAMERA_API_GET_STATE;
 
        if (!pc || !pc->cb_info || !state) {
-               LOGE("NULL pointer %p %p", pc, state);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, state);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *state = (camera_state_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_STATE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3081,17 +3101,17 @@ int camera_start_focusing(camera_h camera, bool continuous)
        int is_continuous = (int)continuous;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, is_continuous);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3103,15 +3123,15 @@ int camera_cancel_focusing(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_CANCEL_FOCUSING;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter, remote_handle : %td", pc->remote_handle);
+       CAM_LOG_INFO("Enter, remote_handle : %td", pc->remote_handle);
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3129,17 +3149,17 @@ int _camera_set_display(camera_h camera, mm_display_type_e type, void *display)
        muse_camera_display_info_s *dp_info = NULL;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        if (type > MM_DISPLAY_TYPE_OVERLAY_EXT) {
-               LOGE("invalid type %d", type);
+               CAM_LOG_ERROR("invalid type %d", type);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        if (type != MM_DISPLAY_TYPE_NONE && display == NULL) {
-               LOGE("display type[%d] is not NONE, but display handle is NULL", type);
+               CAM_LOG_ERROR("display type[%d] is not NONE, but display handle is NULL", type);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -3148,37 +3168,37 @@ int _camera_set_display(camera_h camera, mm_display_type_e type, void *display)
 
        ret = camera_get_state(camera, &current_state);
        if (ret != CAMERA_ERROR_NONE) {
-               LOGE("failed to get current state 0x%x", ret);
+               CAM_LOG_ERROR("failed to get current state 0x%x", ret);
                return ret;
        }
 
        if (current_state != CAMERA_STATE_CREATED) {
-               LOGE("INVALID_STATE : current %d", current_state);
+               CAM_LOG_ERROR("INVALID_STATE : current %d", current_state);
                return CAMERA_ERROR_INVALID_STATE;
        }
 
-       LOGD("Enter - type : %d, display : %p", type, display);
+       CAM_LOG_INFO("Enter - type : %d, display : %p", type, display);
 
        if (type != MM_DISPLAY_TYPE_NONE) {
                /* check display interface handle */
                if (!cb_info->dp_interface) {
-                       LOGE("display interface not supported");
+                       CAM_LOG_ERROR("display interface not supported");
                        return CAMERA_ERROR_NOT_SUPPORTED;
                }
 
                mm_ret = mm_display_interface_set_display(cb_info->dp_interface, type, display, &dp_info->parent_id);
                if (mm_ret == (int)MM_ERROR_NOT_SUPPORT_API) {
-                       LOGE("[NOT_SUPPORTED] type %d", type);
+                       CAM_LOG_ERROR("[NOT_SUPPORTED] type %d", type);
                        return CAMERA_ERROR_NOT_SUPPORTED;
                } else if (mm_ret != MM_ERROR_NONE) {
-                       LOGE("[INVALID_OPERATION] set display failed[0x%x]", mm_ret);
+                       CAM_LOG_ERROR("[INVALID_OPERATION] set display failed[0x%x]", mm_ret);
                        return CAMERA_ERROR_INVALID_OPERATION;
                }
 
                if (type == MM_DISPLAY_TYPE_OVERLAY || type == MM_DISPLAY_TYPE_OVERLAY_EXT) {
                        mm_ret = mm_display_interface_get_window_rect(cb_info->dp_interface, &dp_info->window_rect);
 
-                       LOGD("ret 0x%x, parent_id %d, window rect %d,%d,%dx%d",
+                       CAM_LOG_INFO("ret 0x%x, parent_id %d, window rect %d,%d,%dx%d",
                                ret, dp_info->parent_id, dp_info->window_rect.x, dp_info->window_rect.y,
                                dp_info->window_rect.width, dp_info->window_rect.height);
                } else if (type == MM_DISPLAY_TYPE_EVAS) {
@@ -3197,7 +3217,7 @@ int _camera_set_display(camera_h camera, mm_display_type_e type, void *display)
                        camera_get_display_rotation(camera, &rotation);
                        camera_is_display_visible(camera, &visible);
 
-                       LOGD("current setting : flip %d, mode %d, rotation %d, visible %d",
+                       CAM_LOG_INFO("current setting : flip %d, mode %d, rotation %d, visible %d",
                                flip, mode, rotation, visible);
 
                        mm_ret = mm_display_interface_evas_set_flip(cb_info->dp_interface, flip);
@@ -3207,7 +3227,7 @@ int _camera_set_display(camera_h camera, mm_display_type_e type, void *display)
 
                        if (mode == CAMERA_DISPLAY_MODE_CUSTOM_ROI) {
                                camera_attr_get_display_roi_area(camera, &x, &y, &width, &height);
-                               LOGD("current setting : roi %d,%d,%dx%d", x, y, width, height);
+                               CAM_LOG_INFO("current setting : roi %d,%d,%dx%d", x, y, width, height);
                                mm_ret |= mm_display_interface_evas_set_roi_area(cb_info->dp_interface, x, y, width, height);
                        }
 //LCOV_EXCL_STOP
@@ -3215,7 +3235,7 @@ int _camera_set_display(camera_h camera, mm_display_type_e type, void *display)
        }
 
        if (mm_ret != MM_ERROR_NONE) {
-               LOGE("mm_ret 0x%x failed", mm_ret);
+               CAM_LOG_ERROR("mm_ret 0x%x failed", mm_ret);
                return CAMERA_ERROR_INVALID_OPERATION;
        }
 
@@ -3236,7 +3256,7 @@ int _camera_set_display(camera_h camera, mm_display_type_e type, void *display)
 
 int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display)
 {
-       LOGD("type %d, display %p", type, display);
+       CAM_LOG_INFO("type %d, display %p", type, display);
        return _camera_set_display(camera, (mm_display_type_e)type, display);
 }
 
@@ -3251,14 +3271,14 @@ int camera_set_preview_resolution(camera_h camera, int width, int height)
        int value = 0;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
                ret = camera_get_state(camera, &current_state);
                if (ret != CAMERA_ERROR_NONE) {
-                       LOGE("failed to get current state 0x%x", ret);
+                       CAM_LOG_ERROR("failed to get current state 0x%x", ret);
                        return ret;
                }
 
@@ -3272,14 +3292,14 @@ int camera_set_preview_resolution(camera_h camera, int width, int height)
        value = (width << 16) | height;
        CAMERA_MSG_PARAM_SET(param, INT, value);
 
-       LOGD("%dx%d -> 0x%x", width, height, value);
+       CAM_LOG_INFO("%dx%d -> 0x%x", width, height, value);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        if (current_state == CAMERA_STATE_PREVIEW) {
-               LOGW("restart evas rendering");
+               CAM_LOG_WARNING("restart evas rendering");
                _camera_start_evas_rendering(camera);
        }
 
@@ -3296,18 +3316,18 @@ int camera_set_capture_resolution(camera_h camera, int width, int height)
        int value = 0;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        value = (width << 16) | height;
        CAMERA_MSG_PARAM_SET(param, INT, value);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3322,17 +3342,17 @@ int camera_set_capture_format(camera_h camera, camera_pixel_format_e format)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter - format %d", set_format);
+       CAM_LOG_INFO("Enter - format %d", set_format);
 
        CAMERA_MSG_PARAM_SET(param, INT, set_format);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3347,11 +3367,11 @@ int camera_set_preview_format(camera_h camera, camera_pixel_format_e format)
        muse_camera_api_e api = MUSE_CAMERA_API_SET_PREVIEW_FORMAT;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter - format %d", set_format);
+       CAM_LOG_INFO("Enter - format %d", set_format);
 
        CAMERA_MSG_PARAM_SET(param, INT, set_format);
 
@@ -3360,7 +3380,7 @@ int camera_set_preview_format(camera_h camera, camera_pixel_format_e format)
        if (ret == CAMERA_ERROR_NONE)
                pc->cb_info->preview_format = set_format;
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3373,11 +3393,11 @@ int camera_get_preview_resolution(camera_h camera, int *width, int *height)
        muse_camera_api_e api = MUSE_CAMERA_API_GET_PREVIEW_RESOLUTION;
 
        if (!pc || !pc->cb_info || !width || !height) {
-               LOGE("NULL pointer %p %p %p", pc, width, height);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, width, height);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3386,7 +3406,7 @@ int camera_get_preview_resolution(camera_h camera, int *width, int *height)
                *height = 0x0000ffff & pc->cb_info->get_int[MUSE_CAMERA_GET_INT_PREVIEW_RESOLUTION];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3400,14 +3420,14 @@ int camera_set_display_rotation(camera_h camera, camera_rotation_e rotation)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
                ret = mm_display_interface_evas_set_rotation(pc->cb_info->dp_interface, rotation);
                if (ret != MM_ERROR_NONE) {
-                       LOGE("failed to set rotation for evas surface 0x%x", ret);
+                       CAM_LOG_ERROR("failed to set rotation for evas surface 0x%x", ret);
                        return CAMERA_ERROR_INVALID_OPERATION;
                }
        }
@@ -3426,7 +3446,7 @@ int camera_get_display_rotation(camera_h camera, camera_rotation_e *rotation)
        camera_cli_s *pc = (camera_cli_s *)camera;
 
        if (!pc || !pc->cb_info || !rotation) {
-               LOGE("NULL pointer %p %p", pc, rotation);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, rotation);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -3447,14 +3467,14 @@ int camera_set_display_flip(camera_h camera, camera_flip_e flip)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
                ret = mm_display_interface_evas_set_flip(pc->cb_info->dp_interface, flip);
                if (ret != MM_ERROR_NONE) {
-                       LOGE("failed to set flip for evas surface 0x%x", ret);
+                       CAM_LOG_ERROR("failed to set flip for evas surface 0x%x", ret);
                        return CAMERA_ERROR_INVALID_OPERATION;
                }
        }
@@ -3473,7 +3493,7 @@ int camera_get_display_flip(camera_h camera, camera_flip_e *flip)
        camera_cli_s *pc = (camera_cli_s *)camera;
 
        if (!pc || !pc->cb_info || !flip) {
-               LOGE("NULL pointer %p %p", pc, flip);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, flip);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -3494,14 +3514,14 @@ int camera_set_display_visible(camera_h camera, bool visible)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
                ret = mm_display_interface_evas_set_visible(pc->cb_info->dp_interface, visible);
                if (ret != MM_ERROR_NONE) {
-                       LOGE("failed to set visible for evas surface 0x%x", ret);
+                       CAM_LOG_ERROR("failed to set visible for evas surface 0x%x", ret);
                        return CAMERA_ERROR_INVALID_OPERATION;
                }
        }
@@ -3520,7 +3540,7 @@ int camera_is_display_visible(camera_h camera, bool *visible)
        camera_cli_s *pc = (camera_cli_s *)camera;
 
        if (!pc || !pc->cb_info || !visible) {
-               LOGE("NULL pointer %p %p", pc, visible);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, visible);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -3541,14 +3561,14 @@ int camera_set_display_mode(camera_h camera, camera_display_mode_e mode)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
                ret = mm_display_interface_evas_set_mode(pc->cb_info->dp_interface, mode);
                if (ret != MM_ERROR_NONE) {
-                       LOGE("failed to set geometry for evas surface 0x%x", ret);
+                       CAM_LOG_ERROR("failed to set geometry for evas surface 0x%x", ret);
                        return CAMERA_ERROR_INVALID_OPERATION;
                }
        }
@@ -3567,7 +3587,7 @@ int camera_get_display_mode(camera_h camera, camera_display_mode_e *mode)
        camera_cli_s *pc = (camera_cli_s *)camera;
 
        if (!pc || !pc->cb_info || !mode) {
-               LOGE("NULL pointer %p %p", pc, mode);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, mode);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -3588,11 +3608,11 @@ int camera_set_display_reuse_hint(camera_h camera, bool hint)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter - hint %d", set_hint);
+       CAM_LOG_INFO("Enter - hint %d", set_hint);
 
        CAMERA_MSG_PARAM_SET(param, INT, set_hint);
 
@@ -3609,7 +3629,7 @@ int camera_get_display_reuse_hint(camera_h camera, bool *hint)
        muse_camera_api_e api = MUSE_CAMERA_API_GET_DISPLAY_REUSE_HINT;
 
        if (!pc || !pc->cb_info || !hint) {
-               LOGE("NULL pointer %p %p", pc, hint);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, hint);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -3617,7 +3637,7 @@ int camera_get_display_reuse_hint(camera_h camera, bool *hint)
 
        if (ret == CAMERA_ERROR_NONE) {
                *hint = (bool)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_DISPLAY_REUSE_HINT];
-               LOGD("display reuse hint %d", *hint);
+               CAM_LOG_INFO("display reuse hint %d", *hint);
        }
 
        return ret;
@@ -3631,11 +3651,11 @@ int camera_get_capture_resolution(camera_h camera, int *width, int *height)
        muse_camera_api_e api = MUSE_CAMERA_API_GET_CAPTURE_RESOLUTION;
 
        if (!pc || !pc->cb_info || !width || !height) {
-               LOGE("NULL pointer %p %p %p", pc, width, height);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, width, height);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3644,7 +3664,7 @@ int camera_get_capture_resolution(camera_h camera, int *width, int *height)
                *height = 0x0000ffff & pc->cb_info->get_int[MUSE_CAMERA_GET_INT_CAPTURE_RESOLUTION];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3657,18 +3677,18 @@ int camera_get_capture_format(camera_h camera, camera_pixel_format_e *format)
        muse_camera_api_e api = MUSE_CAMERA_API_GET_CAPTURE_FORMAT;
 
        if (!pc || !pc->cb_info || !format) {
-               LOGE("NULL pointer %p %p", pc, format);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, format);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *format = (camera_pixel_format_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_CAPTURE_FORMAT];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3681,18 +3701,18 @@ int camera_get_preview_format(camera_h camera, camera_pixel_format_e *format)
        muse_camera_api_e api = MUSE_CAMERA_API_GET_PREVIEW_FORMAT;
 
        if (!pc || !pc->cb_info || !format) {
-               LOGE("NULL pointer %p %p", pc, format);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, format);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *format = (camera_pixel_format_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_PREVIEW_FORMAT];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3705,18 +3725,18 @@ int camera_get_facing_direction(camera_h camera, camera_facing_direction_e *faci
        muse_camera_api_e api = MUSE_CAMERA_API_GET_FACING_DIRECTION;
 
        if (!pc || !pc->cb_info || !facing_direction) {
-               LOGE("NULL pointer %p %p", pc, facing_direction);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, facing_direction);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *facing_direction = (camera_facing_direction_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_FACING_DIRECTION];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3729,11 +3749,11 @@ int camera_set_preview_cb(camera_h camera, camera_preview_cb callback, void *use
        muse_camera_api_e api = MUSE_CAMERA_API_SET_PREVIEW_CB;
 
        if (!pc || !pc->cb_info || !callback) {
-               LOGE("NULL pointer %p %p", pc, callback);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, callback);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3748,7 +3768,7 @@ int camera_set_preview_cb(camera_h camera, camera_preview_cb callback, void *use
                SET_PREVIEW_CB_TYPE(pc->cb_info, PREVIEW_CB_TYPE_USER);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3761,11 +3781,11 @@ int camera_unset_preview_cb(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_UNSET_PREVIEW_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3780,7 +3800,7 @@ int camera_unset_preview_cb(camera_h camera)
                UNSET_PREVIEW_CB_TYPE(pc->cb_info, PREVIEW_CB_TYPE_USER);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3793,21 +3813,21 @@ int camera_set_media_packet_preview_cb(camera_h camera, camera_media_packet_prev
        muse_camera_api_e api = MUSE_CAMERA_API_SET_MEDIA_PACKET_PREVIEW_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        if (camera_is_supported_media_packet_preview_cb(camera) == false) {
-               LOGE("NOT SUPPORTED");
+               CAM_LOG_ERROR("NOT SUPPORTED");
                return CAMERA_ERROR_NOT_SUPPORTED;
        }
 
        if (callback == NULL) {
-               LOGE("NULL callback");
+               CAM_LOG_ERROR("NULL callback");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3820,7 +3840,7 @@ int camera_set_media_packet_preview_cb(camera_h camera, camera_media_packet_prev
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3833,11 +3853,11 @@ int camera_unset_media_packet_preview_cb(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_UNSET_MEDIA_PACKET_PREVIEW_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3850,7 +3870,7 @@ int camera_unset_media_packet_preview_cb(camera_h camera)
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3863,11 +3883,11 @@ int camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callbac
        muse_camera_api_e api = MUSE_CAMERA_API_SET_STATE_CHANGED_CB;
 
        if (!pc || !pc->cb_info || !callback) {
-               LOGE("NULL pointer %p %p", pc, callback);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, callback);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3880,7 +3900,7 @@ int camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callbac
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3893,11 +3913,11 @@ int camera_unset_state_changed_cb(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_UNSET_STATE_CHANGED_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3910,7 +3930,7 @@ int camera_unset_state_changed_cb(camera_h camera)
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3923,11 +3943,11 @@ int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback, v
        muse_camera_api_e api = MUSE_CAMERA_API_SET_INTERRUPTED_CB;
 
        if (!pc || !pc->cb_info || !callback) {
-               LOGE("NULL pointer %p %p", pc, callback);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, callback);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3940,7 +3960,7 @@ int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback, v
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_INTERRUPTED]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3953,11 +3973,11 @@ int camera_unset_interrupted_cb(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_UNSET_INTERRUPTED_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -3970,7 +3990,7 @@ int camera_unset_interrupted_cb(camera_h camera)
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_INTERRUPTED]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -3983,11 +4003,11 @@ int camera_set_interrupt_started_cb(camera_h camera, camera_interrupt_started_cb
        muse_camera_api_e api = MUSE_CAMERA_API_SET_INTERRUPT_STARTED_CB;
 
        if (!pc || !pc->cb_info || !callback) {
-               LOGE("NULL pointer %p %p", pc, callback);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, callback);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -4000,7 +4020,7 @@ int camera_set_interrupt_started_cb(camera_h camera, camera_interrupt_started_cb
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_INTERRUPT_STARTED]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4013,11 +4033,11 @@ int camera_unset_interrupt_started_cb(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_UNSET_INTERRUPT_STARTED_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -4030,7 +4050,7 @@ int camera_unset_interrupt_started_cb(camera_h camera)
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_INTERRUPT_STARTED]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4043,11 +4063,11 @@ int camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callbac
        muse_camera_api_e api = MUSE_CAMERA_API_SET_FOCUS_CHANGED_CB;
 
        if (!pc || !pc->cb_info || !callback) {
-               LOGE("NULL pointer %p %p", pc, callback);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, callback);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -4060,7 +4080,7 @@ int camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callbac
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4073,11 +4093,11 @@ int camera_unset_focus_changed_cb(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_UNSET_FOCUS_CHANGED_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -4090,7 +4110,7 @@ int camera_unset_focus_changed_cb(camera_h camera)
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4103,11 +4123,11 @@ int camera_set_error_cb(camera_h camera, camera_error_cb callback, void *user_da
        muse_camera_api_e api = MUSE_CAMERA_API_SET_ERROR_CB;
 
        if (!pc || !pc->cb_info || !callback) {
-               LOGE("NULL pointer %p %p", pc, callback);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, callback);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -4120,7 +4140,7 @@ int camera_set_error_cb(camera_h camera, camera_error_cb callback, void *user_da
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_ERROR]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4133,11 +4153,11 @@ int camera_unset_error_cb(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_UNSET_ERROR_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -4150,7 +4170,7 @@ int camera_unset_error_cb(camera_h camera)
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_ERROR]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4163,18 +4183,18 @@ int camera_foreach_supported_preview_resolution(camera_h camera, camera_supporte
        muse_camera_api_e api = MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_PREVIEW_RESOLUTION;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4187,18 +4207,18 @@ int camera_foreach_supported_capture_resolution(camera_h camera, camera_supporte
        muse_camera_api_e api = MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_CAPTURE_RESOLUTION;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4211,18 +4231,18 @@ int camera_foreach_supported_capture_format(camera_h camera, camera_supported_ca
        muse_camera_api_e api = MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_CAPTURE_FORMAT;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4235,18 +4255,18 @@ int camera_foreach_supported_preview_format(camera_h camera, camera_supported_pr
        muse_camera_api_e api = MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_PREVIEW_FORMAT;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_FORMAT] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_FORMAT] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4259,11 +4279,11 @@ int camera_get_recommended_preview_resolution(camera_h camera, int *width, int *
        muse_camera_api_e api = MUSE_CAMERA_API_GET_RECOMMENDED_PREVIEW_RESOLUTION;
 
        if (!pc || !pc->cb_info || !width || !height) {
-               LOGE("NULL pointer %p %p %p", pc, width, height);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, width, height);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE) {
@@ -4271,7 +4291,7 @@ int camera_get_recommended_preview_resolution(camera_h camera, int *width, int *
                *height = 0x0000ffff & pc->cb_info->get_int[MUSE_CAMERA_GET_INT_RECOMMENDED_PREVIEW_RESOLUTION];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4284,18 +4304,18 @@ int camera_attr_get_lens_orientation(camera_h camera, int *angle)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_LENS_ORIENTATION;
 
        if (!pc || !pc->cb_info || !angle) {
-               LOGE("NULL pointer %p %p", pc, angle);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, angle);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *angle = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_LENS_ORIENTATION];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4310,17 +4330,17 @@ int camera_attr_set_theater_mode(camera_h camera, camera_attr_theater_mode_e mod
        int set_mode = (int)mode;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_mode);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4333,18 +4353,18 @@ int camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mode_e *mo
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_THEATER_MODE;
 
        if (!pc || !pc->cb_info || !mode) {
-               LOGE("NULL pointer %p %p", pc, mode);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, mode);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *mode = (camera_attr_theater_mode_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_THEATER_MODE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4357,18 +4377,18 @@ int camera_attr_foreach_supported_theater_mode(camera_h camera, camera_attr_supp
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_THEATER_MODE;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("Finish, return :%x", ret);
+       CAM_LOG_INFO("Finish, return :%x", ret);
 
        return ret;
 }
@@ -4383,17 +4403,17 @@ int camera_attr_set_preview_fps(camera_h camera, camera_attr_fps_e fps)
        int set_fps = (int)fps;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_fps);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4407,17 +4427,17 @@ int camera_attr_set_image_quality(camera_h camera, int quality)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, quality);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4430,18 +4450,18 @@ int camera_attr_get_preview_fps(camera_h camera, camera_attr_fps_e *fps)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_PREVIEW_FPS;
 
        if (!pc || !pc->cb_info || !fps) {
-               LOGE("NULL pointer %p %p", pc, fps);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, fps);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *fps = (camera_attr_fps_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_PREVIEW_FPS];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4454,18 +4474,18 @@ int camera_attr_get_image_quality(camera_h camera, int *quality)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_IMAGE_QUALITY;
 
        if (!pc || !pc->cb_info || !quality) {
-               LOGE("NULL pointer %p %p", pc, quality);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, quality);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *quality = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_IMAGE_QUALITY];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4478,18 +4498,18 @@ int camera_attr_get_encoded_preview_bitrate(camera_h camera, int *bitrate)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_BITRATE;
 
        if (!pc || !pc->cb_info || !bitrate) {
-               LOGE("NULL pointer %p %p", pc, bitrate);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, bitrate);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *bitrate = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_BITRATE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4504,17 +4524,17 @@ int camera_attr_set_encoded_preview_bitrate(camera_h camera, int bitrate)
        int set_bitrate = bitrate;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_bitrate);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4527,18 +4547,18 @@ int camera_attr_get_encoded_preview_gop_interval(camera_h camera, int *interval)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_GOP_INTERVAL;
 
        if (!pc || !pc->cb_info || !interval) {
-               LOGE("NULL pointer %p %p", pc, interval);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, interval);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *interval = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_GOP_INTERVAL];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4553,17 +4573,17 @@ int camera_attr_set_encoded_preview_gop_interval(camera_h camera, int interval)
        int set_gop_interval = interval;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_gop_interval);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4577,17 +4597,17 @@ int camera_attr_set_zoom(camera_h camera, int zoom)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter, remote_handle : %td", pc->remote_handle);
+       CAM_LOG_INFO("Enter, remote_handle : %td", pc->remote_handle);
 
        CAMERA_MSG_PARAM_SET(param, INT, zoom);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4602,11 +4622,11 @@ int camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode)
        int set_mode = (int)mode;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter, remote_handle : %td", pc->remote_handle);
+       CAM_LOG_INFO("Enter, remote_handle : %td", pc->remote_handle);
 
        CAMERA_MSG_PARAM_SET(param, INT, set_mode);
 
@@ -4625,18 +4645,18 @@ int camera_attr_set_af_area(camera_h camera, int x, int y)
        int value = 0;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter - %d,%d", x, y);
+       CAM_LOG_INFO("Enter - %d,%d", x, y);
 
        value = (x << 16) | y;
        CAMERA_MSG_PARAM_SET(param, INT, value);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4649,15 +4669,15 @@ int camera_attr_clear_af_area(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_CLEAR_AF_AREA;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4672,17 +4692,17 @@ int camera_attr_set_exposure_mode(camera_h camera, camera_attr_exposure_mode_e m
        int set_mode = (int)mode;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_mode);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4696,17 +4716,17 @@ int camera_attr_set_exposure(camera_h camera, int value)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, value);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4721,17 +4741,17 @@ int camera_attr_set_iso(camera_h camera, camera_attr_iso_e iso)
        int set_iso = (int)iso;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_iso);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4745,17 +4765,17 @@ int camera_attr_set_brightness(camera_h camera, int level)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, level);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4769,17 +4789,17 @@ int camera_attr_set_contrast(camera_h camera, int level)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, level);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4793,17 +4813,17 @@ int camera_attr_set_hue(camera_h camera, int level)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, level);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4818,17 +4838,17 @@ int camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e wb)
        int set_whitebalance = (int)wb;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_whitebalance);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4843,17 +4863,17 @@ int camera_attr_set_effect(camera_h camera, camera_attr_effect_mode_e effect)
        int set_effect = (int)effect;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_effect);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4868,17 +4888,17 @@ int camera_attr_set_scene_mode(camera_h camera, camera_attr_scene_mode_e mode)
        int set_mode = (int)mode;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_mode);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4893,17 +4913,17 @@ int camera_attr_enable_tag(camera_h camera, bool enable)
        int set_enable = (int)enable;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_enable);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4917,17 +4937,17 @@ int camera_attr_set_tag_image_description(camera_h camera, const char *descripti
        camera_msg_param param;
 
        if (!pc || !pc->cb_info || !description) {
-               LOGE("NULL pointer %p %p", pc, description);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, description);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, STRING, description);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4942,17 +4962,17 @@ int camera_attr_set_tag_orientation(camera_h camera, camera_attr_tag_orientation
        int set_orientation = (int)orientation;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_orientation);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4966,17 +4986,17 @@ int camera_attr_set_tag_software(camera_h camera, const char *software)
        camera_msg_param param;
 
        if (!pc || !pc->cb_info || !software) {
-               LOGE("NULL pointer %p %p", pc, software);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, software);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter, remote_handle : %td", pc->remote_handle);
+       CAM_LOG_INFO("Enter, remote_handle : %td", pc->remote_handle);
 
        CAMERA_MSG_PARAM_SET(param, STRING, software);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -4993,11 +5013,11 @@ int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, d
        int send_ret = 0;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        length = sizeof(set_geotag) / sizeof(int) + \
                (sizeof(set_geotag) % sizeof(int) ? 1 : 0);
@@ -5006,7 +5026,7 @@ int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, d
                MUSE_TYPE_ARRAY, "set_geotag", length, (int *)set_geotag,
                NULL);
        if (!msg) {
-               LOGE("msg creation failed: api %d", api);
+               CAM_LOG_ERROR("msg creation failed: api %d", api);
                return CAMERA_ERROR_OUT_OF_MEMORY;
        }
 
@@ -5019,7 +5039,7 @@ int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, d
        }
 
        if (send_ret < 0) {
-               LOGE("message send failed");
+               CAM_LOG_ERROR("message send failed");
                ret = CAMERA_ERROR_INVALID_OPERATION;
        } else {
                ret = _camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
@@ -5029,7 +5049,7 @@ int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, d
 
        muse_core_msg_free(msg);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5042,15 +5062,15 @@ int camera_attr_remove_geotag(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_REMOVE_GEOTAG;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5065,17 +5085,17 @@ int camera_attr_set_flash_mode(camera_h camera, camera_attr_flash_mode_e mode)
        int set_mode = (int)mode;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_mode);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5088,18 +5108,18 @@ int camera_attr_get_zoom(camera_h camera, int *zoom)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ZOOM;
 
        if (!pc || !pc->cb_info || !zoom) {
-               LOGE("NULL pointer %p %p", pc, zoom);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, zoom);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *zoom = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_ZOOM];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5112,11 +5132,11 @@ int camera_attr_get_zoom_range(camera_h camera, int *min, int *max)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ZOOM_RANGE;
 
        if (!pc || !pc->cb_info || !min || !max) {
-               LOGE("NULL pointer %p %p %p", pc, min, max);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, min, max);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -5125,7 +5145,7 @@ int camera_attr_get_zoom_range(camera_h camera, int *min, int *max)
                *max = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_ZOOM_RANGE][1];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5138,18 +5158,18 @@ int camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_AF_MODE;
 
        if (!pc || !pc->cb_info || !mode) {
-               LOGE("NULL pointer %p %p", pc, mode);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, mode);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *mode = (camera_attr_af_mode_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_AF_MODE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5162,18 +5182,18 @@ int camera_attr_get_exposure_mode(camera_h camera, camera_attr_exposure_mode_e *
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_EXPOSURE_MODE;
 
        if (!pc || !pc->cb_info || !mode) {
-               LOGE("NULL pointer %p %p", pc, mode);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, mode);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *mode = (camera_attr_exposure_mode_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_EXPOSURE_MODE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5186,18 +5206,18 @@ int camera_attr_get_exposure(camera_h camera, int *value)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_EXPOSURE;
 
        if (!pc || !pc->cb_info || !value) {
-               LOGE("NULL pointer %p %p", pc, value);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, value);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *value = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_EXPOSURE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5210,11 +5230,11 @@ int camera_attr_get_exposure_range(camera_h camera, int *min, int *max)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_EXPOSURE_RANGE;
 
        if (!pc || !pc->cb_info || !min || !max) {
-               LOGE("NULL pointer %p %p %p", pc, min, max);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, min, max);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -5223,7 +5243,7 @@ int camera_attr_get_exposure_range(camera_h camera, int *min, int *max)
                *max = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_EXPOSURE_RANGE][1];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5236,18 +5256,18 @@ int camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_ISO;
 
        if (!pc || !pc->cb_info || !iso) {
-               LOGE("NULL pointer %p %p", pc, iso);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, iso);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *iso = (camera_attr_iso_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_ISO];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5260,18 +5280,18 @@ int camera_attr_get_brightness(camera_h camera, int *level)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_BRIGHTNESS;
 
        if (!pc || !pc->cb_info || !level) {
-               LOGE("NULL pointer %p %p", pc, level);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, level);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *level = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_BRIGHTNESS];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5284,11 +5304,11 @@ int camera_attr_get_brightness_range(camera_h camera, int *min, int *max)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_BRIGHTNESS_RANGE;
 
        if (!pc || !pc->cb_info || !min || !max) {
-               LOGE("NULL pointer %p %p %p", pc, min, max);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, min, max);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -5297,7 +5317,7 @@ int camera_attr_get_brightness_range(camera_h camera, int *min, int *max)
                *max = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_BRIGHTNESS_RANGE][1];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5310,18 +5330,18 @@ int camera_attr_get_contrast(camera_h camera, int *level)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_CONTRAST;
 
        if (!pc || !pc->cb_info || !level) {
-               LOGE("NULL pointer %p %p", pc, level);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, level);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *level = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_CONTRAST];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5334,21 +5354,21 @@ int camera_attr_get_contrast_range(camera_h camera, int *min, int *max)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_CONTRAST_RANGE;
 
        if (!pc || !pc->cb_info || !min || !max) {
-               LOGE("NULL pointer %p %p %p", pc, min, max);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, min, max);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE) {
                *min = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_CONTRAST_RANGE][0];
                *max = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_CONTRAST_RANGE][1];
-               LOGD("min %d, max %d", *min, *max);
+               CAM_LOG_INFO("min %d, max %d", *min, *max);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5361,18 +5381,18 @@ int camera_attr_get_hue(camera_h camera, int *level)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_HUE;
 
        if (!pc || !pc->cb_info || !level) {
-               LOGE("NULL pointer %p %p", pc, level);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, level);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *level = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_HUE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5385,21 +5405,21 @@ int camera_attr_get_hue_range(camera_h camera, int *min, int *max)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_HUE_RANGE;
 
        if (!pc || !pc->cb_info || !min || !max) {
-               LOGE("NULL pointer %p %p %p", pc, min, max);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, min, max);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE) {
                *min = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_HUE_RANGE][0];
                *max = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_HUE_RANGE][1];
-               LOGD("min %d, max %d", *min, *max);
+               CAM_LOG_INFO("min %d, max %d", *min, *max);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5412,18 +5432,18 @@ int camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *wb
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE;
 
        if (!pc || !pc->cb_info || !wb) {
-               LOGE("NULL pointer %p %p", pc, wb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, wb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *wb = (camera_attr_whitebalance_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_WHITE_BALANCE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5436,18 +5456,18 @@ int camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *effect)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_EFFECT;
 
        if (!pc || !pc->cb_info || !effect) {
-               LOGE("NULL pointer %p %p", pc, effect);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, effect);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *effect = (camera_attr_effect_mode_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_EFFECT];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5460,18 +5480,18 @@ int camera_attr_get_scene_mode(camera_h camera, camera_attr_scene_mode_e *mode)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_SCENE_MODE;
 
        if (!pc || !pc->cb_info || !mode) {
-               LOGE("NULL pointer %p %p", pc, mode);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, mode);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *mode = (camera_attr_scene_mode_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_SCENE_MODE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5484,18 +5504,18 @@ int camera_attr_is_enabled_tag(camera_h camera, bool *enable)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_ENABLED_TAG;
 
        if (!pc || !pc->cb_info || !enable) {
-               LOGE("NULL pointer %p %p", pc, enable);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, enable);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *enable = (bool)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_ENABLED_TAG];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5508,18 +5528,18 @@ int camera_attr_get_tag_image_description(camera_h camera, char **description)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TAG_IMAGE_DESCRIPTION;
 
        if (!pc || !pc->cb_info || !description) {
-               LOGE("NULL pointer %p %p", pc, description);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, description);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *description = strdup(pc->cb_info->get_string[MUSE_CAMERA_GET_STRING_TAG_IMAGE_DESCRIPTION]);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5532,18 +5552,18 @@ int camera_attr_get_tag_orientation(camera_h camera, camera_attr_tag_orientation
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TAG_ORIENTATION;
 
        if (!pc || !pc->cb_info || !orientation) {
-               LOGE("NULL pointer %p %p", pc, orientation);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, orientation);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *orientation = (camera_attr_tag_orientation_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_TAG_ORIENTATION];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5556,18 +5576,18 @@ int camera_attr_get_tag_software(camera_h camera, char **software)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TAG_SOFTWARE;
 
        if (!pc || !pc->cb_info || !software) {
-               LOGE("NULL pointer %p %p", pc, software);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, software);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *software = strdup(pc->cb_info->get_string[MUSE_CAMERA_GET_STRING_TAG_SOFTWARE]);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5580,11 +5600,11 @@ int camera_attr_get_geotag(camera_h camera, double *latitude, double *longitude,
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_GEOTAG;
 
        if (!pc || !pc->cb_info || !latitude || !longitude || !altitude) {
-               LOGE("NULL pointer %p %p %p %p", pc, latitude, longitude, altitude);
+               CAM_LOG_ERROR("NULL pointer %p %p %p %p", pc, latitude, longitude, altitude);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -5594,7 +5614,7 @@ int camera_attr_get_geotag(camera_h camera, double *latitude, double *longitude,
                *altitude = pc->cb_info->get_geotag[2];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5607,18 +5627,18 @@ int camera_attr_get_flash_mode(camera_h camera, camera_attr_flash_mode_e *mode)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_FLASH_MODE;
 
        if (!pc || !pc->cb_info || !mode) {
-               LOGE("NULL pointer %p %p", pc, mode);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, mode);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *mode = (camera_attr_flash_mode_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_FLASH_MODE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5630,7 +5650,7 @@ int camera_get_flash_state(camera_device_e device, camera_flash_state_e *state)
        int get_flash_state = 0;
 
        if (!state) {
-               LOGE("NULL pointer");
+               CAM_LOG_ERROR("NULL pointer");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -5639,9 +5659,9 @@ int camera_get_flash_state(camera_device_e device, camera_flash_state_e *state)
 
        if (ret == CAMERA_ERROR_NONE) {
                *state = (camera_flash_state_e)get_flash_state;
-               LOGD("flash state %d", *state);
+               CAM_LOG_INFO("flash state %d", *state);
        } else {
-               LOGE("failed 0x%x", ret);
+               CAM_LOG_ERROR("failed 0x%x", ret);
        }
 
        return ret;
@@ -5655,18 +5675,18 @@ int camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_supported
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_AF_MODE;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_AF_MODE] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_AF_MODE] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5679,18 +5699,18 @@ int camera_attr_foreach_supported_exposure_mode(camera_h camera, camera_attr_sup
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_EXPOSURE_MODE;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EXPOSURE_MODE] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EXPOSURE_MODE] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5703,18 +5723,18 @@ int camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_ISO;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_ISO] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_ISO] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5727,18 +5747,18 @@ int camera_attr_foreach_supported_whitebalance(camera_h camera, camera_attr_supp
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_WHITEBALANCE;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_WHITEBALANCE] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_WHITEBALANCE] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5751,18 +5771,18 @@ int camera_attr_foreach_supported_effect(camera_h camera, camera_attr_supported_
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_EFFECT;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5775,18 +5795,18 @@ int camera_attr_foreach_supported_scene_mode(camera_h camera, camera_attr_suppor
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_SCENE_MODE;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_SCENE_MODE] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_SCENE_MODE] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5799,18 +5819,18 @@ int camera_attr_foreach_supported_flash_mode(camera_h camera, camera_attr_suppor
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_FLASH_MODE;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FLASH_MODE] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FLASH_MODE] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5823,18 +5843,18 @@ int camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_FPS;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("Enter, handle :%td", pc->remote_handle);
+       CAM_LOG_INFO("Enter, handle :%td", pc->remote_handle);
 
        return ret;
 }
@@ -5849,11 +5869,11 @@ int camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int width,
        int value = 0;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS_BY_RESOLUTION] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS_BY_RESOLUTION] = user_data;
@@ -5863,7 +5883,7 @@ int camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int width,
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5876,18 +5896,18 @@ int camera_attr_foreach_supported_stream_flip(camera_h camera, camera_attr_suppo
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_STREAM_FLIP;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5900,18 +5920,18 @@ int camera_attr_foreach_supported_stream_rotation(camera_h camera, camera_attr_s
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_STREAM_ROTATION;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5926,17 +5946,17 @@ int camera_attr_set_stream_rotation(camera_h camera, camera_rotation_e rotation)
        int set_rotation = (int)rotation;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_rotation);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5949,18 +5969,18 @@ int camera_attr_get_stream_rotation(camera_h camera, camera_rotation_e *rotation
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_STREAM_ROTATION;
 
        if (!pc || !pc->cb_info || !rotation) {
-               LOGE("NULL pointer %p %p", pc, rotation);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, rotation);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *rotation = (camera_rotation_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_STREAM_ROTATION];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5975,17 +5995,17 @@ int camera_attr_set_stream_flip(camera_h camera, camera_flip_e flip)
        int set_flip = (int)flip;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_flip);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -5998,18 +6018,18 @@ int camera_attr_get_stream_flip(camera_h camera, camera_flip_e *flip)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_STREAM_FLIP;
 
        if (!pc || !pc->cb_info || !flip) {
-               LOGE("NULL pointer %p %p", pc, flip);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, flip);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *flip = (camera_flip_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_STREAM_FLIP];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6023,17 +6043,17 @@ int camera_attr_set_hdr_mode(camera_h camera, camera_attr_hdr_mode_e mode)
        int set_mode = (int)mode;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_mode);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6046,18 +6066,18 @@ int camera_attr_get_hdr_mode(camera_h camera, camera_attr_hdr_mode_e *mode)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_HDR_MODE;
 
        if (!pc || !pc->cb_info || !mode) {
-               LOGE("NULL pointer %p %p", pc, mode);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, mode);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *mode = (camera_attr_hdr_mode_e)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_HDR_MODE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6070,20 +6090,20 @@ bool camera_attr_is_supported_hdr_capture(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_SUPPORTED_HDR_CAPTURE;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret < 0) {
-               LOGE("error is occurred 0x%x", ret);
+               CAM_LOG_ERROR("error is occurred 0x%x", ret);
                ret = false;
        }
 
-       LOGD("ret : %d", ret);
+       CAM_LOG_INFO("ret : %d", ret);
 
        return (bool)ret;
 }
@@ -6096,19 +6116,19 @@ int camera_attr_set_hdr_capture_progress_cb(camera_h camera, camera_attr_hdr_pro
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_HDR_CAPTURE_PROGRESS_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        if (!camera_attr_is_supported_hdr_capture(camera)) {
-               LOGE("HDR not supported");
+               CAM_LOG_ERROR("HDR not supported");
                return CAMERA_ERROR_NOT_SUPPORTED;
        }
 
        if (!callback) {
-               LOGE("NULL callback");
+               CAM_LOG_ERROR("NULL callback");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -6123,7 +6143,7 @@ int camera_attr_set_hdr_capture_progress_cb(camera_h camera, camera_attr_hdr_pro
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6136,11 +6156,11 @@ int camera_attr_unset_hdr_capture_progress_cb(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_UNSET_HDR_CAPTURE_PROGRESS_CB;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -6153,7 +6173,7 @@ int camera_attr_unset_hdr_capture_progress_cb(camera_h camera)
                g_mutex_unlock(&pc->cb_info->user_cb_mutex[MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS]);
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6168,17 +6188,17 @@ int camera_attr_enable_anti_shake(camera_h camera, bool enable)
        int set_enable = (int)enable;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_enable);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6191,18 +6211,18 @@ int camera_attr_is_enabled_anti_shake(camera_h camera, bool *enabled)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_ENABLED_ANTI_SHAKE;
 
        if (!pc || !pc->cb_info || !enabled) {
-               LOGE("NULL pointer %p %p", pc, enabled);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, enabled);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *enabled = (bool)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_ENABLED_ANTI_SHAKE];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6215,20 +6235,20 @@ bool camera_attr_is_supported_anti_shake(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_SUPPORTED_ANTI_SHAKE;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret < 0) {
-               LOGE("error is occurred 0x%x", ret);
+               CAM_LOG_ERROR("error is occurred 0x%x", ret);
                ret = false;
        }
 
-       LOGD("ret : %d", ret);
+       CAM_LOG_INFO("ret : %d", ret);
 
        return (bool)ret;
 }
@@ -6243,17 +6263,17 @@ int camera_attr_enable_video_stabilization(camera_h camera, bool enable)
        int set_enable = (int)enable;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_enable);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6266,18 +6286,18 @@ int camera_attr_is_enabled_video_stabilization(camera_h camera, bool *enabled)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_ENABLED_VIDEO_STABILIZATION;
 
        if (!pc || !pc->cb_info || !enabled) {
-               LOGE("NULL pointer %p %p", pc, enabled);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, enabled);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *enabled = (bool)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_ENABLED_VIDEO_STABILIZATION];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6290,20 +6310,20 @@ bool camera_attr_is_supported_video_stabilization(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_SUPPORTED_VIDEO_STABILIZATION;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret < 0) {
-               LOGE("error is occurred 0x%x", ret);
+               CAM_LOG_ERROR("error is occurred 0x%x", ret);
                ret = false;
        }
 
-       LOGD("ret : %d", ret);
+       CAM_LOG_INFO("ret : %d", ret);
 
        return (bool)ret;
 }
@@ -6318,17 +6338,17 @@ int camera_attr_enable_auto_contrast(camera_h camera, bool enable)
        int set_enable = (int)enable;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_enable);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6341,18 +6361,18 @@ int camera_attr_is_enabled_auto_contrast(camera_h camera, bool *enabled)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_ENABLED_AUTO_CONTRAST;
 
        if (!pc || !pc->cb_info || !enabled) {
-               LOGE("NULL pointer %p %p", pc, enabled);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, enabled);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *enabled = (bool)pc->cb_info->get_int[MUSE_CAMERA_GET_INT_ENABLED_AUTO_CONTRAST];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6365,20 +6385,20 @@ bool camera_attr_is_supported_auto_contrast(camera_h camera)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_IS_SUPPORTED_AUTO_CONTRAST;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret < 0) {
-               LOGE("error is occurred 0x%x", ret);
+               CAM_LOG_ERROR("error is occurred 0x%x", ret);
                ret = false;
        }
 
-       LOGD("ret : %d", ret);
+       CAM_LOG_INFO("ret : %d", ret);
 
        return (bool)ret;
 }
@@ -6393,17 +6413,17 @@ int camera_attr_disable_shutter_sound(camera_h camera, bool disable)
        int set_disable = (int)disable;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_disable);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6418,11 +6438,11 @@ int camera_attr_set_pan(camera_h camera, camera_attr_ptz_move_type_e move_type,
        camera_msg_param param1;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param0, INT, move_type);
        CAMERA_MSG_PARAM_SET(param1, INT, pan_step);
@@ -6430,7 +6450,7 @@ int camera_attr_set_pan(camera_h camera, camera_attr_ptz_move_type_e move_type,
        _camera_msg_send_param2_int(api, pc->cb_info, &ret,
                &param0, &param1, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6443,18 +6463,18 @@ int camera_attr_get_pan(camera_h camera, int *pan_step)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_PAN;
 
        if (!pc || !pc->cb_info || !pan_step) {
-               LOGE("NULL pointer %p %p", pc, pan_step);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, pan_step);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *pan_step = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_PAN];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6467,11 +6487,11 @@ int camera_attr_get_pan_range(camera_h camera, int *min, int *max)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_PAN_RANGE;
 
        if (!pc || !pc->cb_info || !min || !max) {
-               LOGE("NULL pointer %p %p %p", pc, min, max);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, min, max);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -6480,7 +6500,7 @@ int camera_attr_get_pan_range(camera_h camera, int *min, int *max)
                *max = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_PAN_RANGE][1];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6495,11 +6515,11 @@ int camera_attr_set_tilt(camera_h camera, camera_attr_ptz_move_type_e move_type,
        camera_msg_param param1;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param0, INT, move_type);
        CAMERA_MSG_PARAM_SET(param1, INT, tilt_step);
@@ -6507,7 +6527,7 @@ int camera_attr_set_tilt(camera_h camera, camera_attr_ptz_move_type_e move_type,
        _camera_msg_send_param2_int(api, pc->cb_info, &ret,
                &param0, &param1, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6520,18 +6540,18 @@ int camera_attr_get_tilt(camera_h camera, int *tilt_step)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TILT;
 
        if (!pc || !pc->cb_info || !tilt_step) {
-               LOGE("NULL pointer %p %p", pc, tilt_step);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, tilt_step);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
        if (ret == CAMERA_ERROR_NONE)
                *tilt_step = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_TILT];
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6544,11 +6564,11 @@ int camera_attr_get_tilt_range(camera_h camera, int *min, int *max)
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_TILT_RANGE;
 
        if (!pc || !pc->cb_info || !min || !max) {
-               LOGE("NULL pointer %p %p %p", pc, min, max);
+               CAM_LOG_ERROR("NULL pointer %p %p %p", pc, min, max);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -6557,7 +6577,7 @@ int camera_attr_get_tilt_range(camera_h camera, int *min, int *max)
                *max = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_TILT_RANGE][1];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6572,17 +6592,17 @@ int camera_attr_set_ptz_type(camera_h camera, camera_attr_ptz_type_e ptz_type)
        int set_ptz_type = (int)ptz_type;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        CAMERA_MSG_PARAM_SET(param, INT, set_ptz_type);
 
        _camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6595,18 +6615,18 @@ int camera_attr_foreach_supported_ptz_type(camera_h camera, camera_attr_supporte
        muse_camera_api_e api = MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_PTZ_TYPE;
 
        if (!pc || !pc->cb_info || !foreach_cb) {
-               LOGE("NULL pointer %p %p", pc, foreach_cb);
+               CAM_LOG_ERROR("NULL pointer %p %p", pc, foreach_cb);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE] = foreach_cb;
        pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE] = user_data;
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6623,16 +6643,16 @@ int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, i
        int send_ret = 0;
 
        if (!pc || !pc->cb_info) {
-               LOGE("NULL handle");
+               CAM_LOG_ERROR("NULL handle");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
                ret = mm_display_interface_evas_set_roi_area(pc->cb_info->dp_interface, x, y, width, height);
                if (ret != MM_ERROR_NONE) {
-                       LOGE("mm_evas_renderer_set_roi_area error 0x%x", ret);
+                       CAM_LOG_ERROR("mm_evas_renderer_set_roi_area error 0x%x", ret);
                        return CAMERA_ERROR_INVALID_OPERATION;
                }
        }
@@ -6644,7 +6664,7 @@ int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, i
                MUSE_TYPE_ARRAY, "set_display_roi_area", length, (int *)set_display_roi_area,
                NULL);
        if (!msg) {
-               LOGE("msg creation failed: api %d", api);
+               CAM_LOG_ERROR("msg creation failed: api %d", api);
                return CAMERA_ERROR_OUT_OF_MEMORY;
        }
 
@@ -6657,7 +6677,7 @@ int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, i
        }
 
        if (send_ret < 0) {
-               LOGE("message send failed");
+               CAM_LOG_ERROR("message send failed");
                ret = CAMERA_ERROR_INVALID_OPERATION;
        } else {
                ret = _camera_client_wait_for_cb_return(api, pc->cb_info, CAMERA_CB_TIMEOUT);
@@ -6667,7 +6687,7 @@ int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, i
 
        muse_core_msg_free(msg);
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6680,11 +6700,11 @@ int camera_attr_get_display_roi_area(camera_h camera, int *x, int *y, int *width
        muse_camera_api_e api = MUSE_CAMERA_API_GET_DISPLAY_ROI_AREA;
 
        if (!pc || !pc->cb_info || !x || !y || !width || !height) {
-               LOGE("NULL pointer %p %p %p %p %p", pc, x, y, width, height);
+               CAM_LOG_ERROR("NULL pointer %p %p %p %p %p", pc, x, y, width, height);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
-       LOGD("Enter");
+       CAM_LOG_INFO("Enter");
 
        _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
 
@@ -6695,7 +6715,7 @@ int camera_attr_get_display_roi_area(camera_h camera, int *x, int *y, int *width
                *height = pc->cb_info->get_display_roi_area[3];
        }
 
-       LOGD("ret : 0x%x", ret);
+       CAM_LOG_INFO("ret : 0x%x", ret);
 
        return ret;
 }
@@ -6707,7 +6727,7 @@ int camera_get_device_state(camera_device_e device, camera_device_state_e *state
        int get_device_state = 0;
 
        if (!state) {
-               LOGE("NULL pointer");
+               CAM_LOG_ERROR("NULL pointer");
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
@@ -6716,9 +6736,9 @@ int camera_get_device_state(camera_device_e device, camera_device_state_e *state
 
        if (ret == CAMERA_ERROR_NONE) {
                *state = (camera_device_state_e)get_device_state;
-               LOGD("device state %d", *state);
+               CAM_LOG_INFO("device state %d", *state);
        } else {
-               LOGE("failed 0x%x", ret);
+               CAM_LOG_ERROR("failed 0x%x", ret);
        }
 
        return ret;
@@ -6732,14 +6752,14 @@ int camera_add_device_state_changed_cb(camera_device_state_changed_cb callback,
        camera_cb_info *info = NULL;
 
        if (!callback || !cb_id) {
-               LOGE("invalid pointer %p %p", callback, cb_id);
+               CAM_LOG_ERROR("invalid pointer %p %p", callback, cb_id);
                return CAMERA_ERROR_INVALID_PARAMETER;
        }
 
        /* check camera support */
        ret = camera_get_device_state(CAMERA_DEVICE_CAMERA0, &state);
        if (ret != CAMERA_ERROR_NONE) {
-               LOGE("get device state failed");
+               CAM_LOG_ERROR("get device state failed");
                return ret;
        }
 
@@ -6747,7 +6767,7 @@ int camera_add_device_state_changed_cb(camera_device_state_changed_cb callback,
 
        info = g_new0(camera_cb_info, 1);
        if (!info) {
-               LOGE("info failed");
+               CAM_LOG_ERROR("info failed");
                ret = CAMERA_ERROR_OUT_OF_MEMORY;
                goto _DONE;
        }
@@ -6762,12 +6782,12 @@ int camera_add_device_state_changed_cb(camera_device_state_changed_cb callback,
        if (!g_cam_dev_state_changed_cb_conn) {
                g_cam_dev_state_changed_cb_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL);
                if (!g_cam_dev_state_changed_cb_conn) {
-                       LOGE("failed to get gdbus connection");
+                       CAM_LOG_ERROR("failed to get gdbus connection");
                        ret = CAMERA_ERROR_INVALID_OPERATION;
                        goto _DONE;
                }
 
-               LOGD("subscribe signal %s - %s - %s",
+               CAM_LOG_INFO("subscribe signal %s - %s - %s",
                        MM_CAMCORDER_DBUS_OBJECT,
                        MM_CAMCORDER_DBUS_INTERFACE_CAMERA,
                        MM_CAMCORDER_DBUS_SIGNAL_STATE_CHANGED);
@@ -6776,17 +6796,17 @@ int camera_add_device_state_changed_cb(camera_device_state_changed_cb callback,
                        NULL, MM_CAMCORDER_DBUS_INTERFACE_CAMERA, MM_CAMCORDER_DBUS_SIGNAL_STATE_CHANGED, MM_CAMCORDER_DBUS_OBJECT, NULL,
                        G_DBUS_SIGNAL_FLAGS_NONE, (GDBusSignalCallback)__camera_device_state_changed_cb, NULL, NULL);
                if (!g_cam_dev_state_changed_cb_subscribe_id) {
-                       LOGE("failed to get gdbus connection");
+                       CAM_LOG_ERROR("failed to get gdbus connection");
                        ret = CAMERA_ERROR_INVALID_OPERATION;
                        goto _DONE;
                }
 
-               LOGD("signal subscribe id %u", g_cam_dev_state_changed_cb_subscribe_id);
+               CAM_LOG_INFO("signal subscribe id %u", g_cam_dev_state_changed_cb_subscribe_id);
        }
 
        g_cam_dev_state_changed_cb_list = g_list_prepend(g_cam_dev_state_changed_cb_list, (gpointer)info);
 
-       LOGD("callback id %d", info->id);
+       CAM_LOG_INFO("callback id %d", info->id);
 
 _DONE:
        if (ret != CAMERA_ERROR_NONE) {
@@ -6817,14 +6837,14 @@ int camera_remove_device_state_changed_cb(int cb_id)
        /* check camera support */
        ret = camera_get_device_state(CAMERA_DEVICE_CAMERA0, &state);
        if (ret != CAMERA_ERROR_NONE) {
-               LOGE("get device state failed");
+               CAM_LOG_ERROR("get device state failed");
                return ret;
        }
 
        g_mutex_lock(&g_cam_dev_state_changed_cb_lock);
 
        if (!g_cam_dev_state_changed_cb_list) {
-               LOGE("there is no callback info");
+               CAM_LOG_ERROR("there is no callback info");
                ret = CAMERA_ERROR_INVALID_OPERATION;
                goto _DONE;
        }
@@ -6836,7 +6856,7 @@ int camera_remove_device_state_changed_cb(int cb_id)
                tmp_list = tmp_list->next;
 
                if (!info) {
-                       LOGW("NULL info");
+                       CAM_LOG_WARNING("NULL info");
                        continue;
                }
 
@@ -6859,14 +6879,14 @@ int camera_remove_device_state_changed_cb(int cb_id)
                                }
                        }
 
-                       LOGD("id %d callback removed", cb_id);
+                       CAM_LOG_INFO("id %d callback removed", cb_id);
                        ret = CAMERA_ERROR_NONE;
 
                        goto _DONE;
                }
        } while (tmp_list);
 
-       LOGE("id %d callback not found", cb_id);
+       CAM_LOG_ERROR("id %d callback not found", cb_id);
        ret = CAMERA_ERROR_INVALID_PARAMETER;
 
 _DONE:
index 3fe61eb..0d868bd 100644 (file)
@@ -505,7 +505,22 @@ void _camera_preview_cb(camera_preview_data_s *frame, void *user_data)
        fp = NULL;
 #else
        g_print("----- preview callback - format %d, %dx%d, num plane %d\n",
-                       frame->format, frame->width, frame->height, frame->num_of_planes);
+               frame->format, frame->width, frame->height, frame->num_of_planes);
+       if (frame->num_of_planes == 1) {
+               g_print("----- length YUV %d\n",
+                       frame->data.single_plane.size);
+       } else if (frame->num_of_planes == 2) {
+               g_print("----- length Y %d, UV %d\n",
+                       frame->data.double_plane.y_size,
+                       frame->data.double_plane.uv_size);
+       } else if (frame->num_of_planes == 3) {
+               g_print("----- length Y %d, U %d, V %d\n",
+                       frame->data.triple_plane.y_size,
+                       frame->data.triple_plane.u_size,
+                       frame->data.triple_plane.v_size);
+       } else {
+               g_print("invalid num of planes %d\n", frame->num_of_planes);
+       }
 #endif
 
        return;
@@ -1023,8 +1038,8 @@ static void setting_menu(gchar buf)
                camera_foreach_supported_preview_format(hcamcorder->camera, preview_format_cb, NULL);
                err = scanf("%d", &idx);
                flush_stdin();
-               bret = camera_set_preview_format(hcamcorder->camera, idx);
                CHECK_MM_ERROR(camera_stop_preview(hcamcorder->camera));
+               bret = camera_set_preview_format(hcamcorder->camera, idx);
                CHECK_MM_ERROR(camera_start_preview(hcamcorder->camera));
                break;
        case 'E': /* Setting > EXIF orientation */