summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2020-09-28 20:19:24 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2020-09-29 20:24:41 +0900
commitd869c1537949a8b65b35c51cb6824235b860f111 (patch)
tree6c50807fb84cbde5b99e4b302ec09ac2866a9a7f /include
parent19a985e4e26b2136162596e5f0e4b57e1435c167 (diff)
downloadcamera-d869c1537949a8b65b35c51cb6824235b860f111.tar.gz
camera-d869c1537949a8b65b35c51cb6824235b860f111.tar.bz2
camera-d869c1537949a8b65b35c51cb6824235b860f111.zip
Revise log related codesubmit/tizen/20201012.060154
[Version] 0.4.40 [Issue Type] Log Change-Id: I70c336478b8ed9e72750a5b18c1047185f17ea01 Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/camera_private.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/camera_private.h b/include/camera_private.h
index 3dfa516..7a171de 100644
--- a/include/camera_private.h
+++ b/include/camera_private.h
@@ -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;