[Call UI] Change log format: add file name to display in logs. 55/57255/3
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Mon, 18 Jan 2016 11:11:40 +0000 (13:11 +0200)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Mon, 18 Jan 2016 11:15:20 +0000 (13:15 +0200)
Change-Id: I59d695036ac4d6867afa8fa696ea1a63d777021f

include/callui.h
src/callui-view-elements.c
src/callui-view-quickpanel.c

index 9c9f5ea..3680ff8 100755 (executable)
 #define CALLUI_LOG_TAG "CALLUI"
 #endif
 
-#define info(fmt,args...)   { __dlog_print(LOG_ID_MAIN, DLOG_INFO,  CALLUI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
-#define dbg(fmt,args...)    { __dlog_print(LOG_ID_MAIN, DLOG_DEBUG, CALLUI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
-#define warn(fmt,args...)   { __dlog_print(LOG_ID_MAIN, DLOG_WARN,  CALLUI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
-#define err(fmt,args...)    { __dlog_print(LOG_ID_MAIN, DLOG_ERROR, CALLUI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
-#define fatal(fmt,args...)  { __dlog_print(LOG_ID_MAIN, DLOG_FATAL, CALLUI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
-
-#define sec_err(fmt, arg...) {SECURE_LOGE(CALLUI_LOG_TAG, "<%s:%d> " fmt"\n", __func__, __LINE__, ##arg); }
-#define sec_warn(fmt, arg...) {SECURE_LOGW(CALLUI_LOG_TAG, "<%s:%d> " fmt"\n", __func__, __LINE__, ##arg); }
-#define sec_dbg(fmt, arg...) {SECURE_LOGD(CALLUI_LOG_TAG, "<%s:%d> " fmt"\n", __func__, __LINE__, ##arg); }
+#define info(fmt,args...)   { __dlog_print(LOG_ID_MAIN, DLOG_INFO,  CALLUI_LOG_TAG, "%s: %s(%d) > " fmt "\n", __FILE__, __func__, __LINE__, ##args); }
+#define dbg(fmt,args...)    { __dlog_print(LOG_ID_MAIN, DLOG_DEBUG, CALLUI_LOG_TAG, "%s: %s(%d) > " fmt "\n", __FILE__, __func__, __LINE__, ##args); }
+#define warn(fmt,args...)   { __dlog_print(LOG_ID_MAIN, DLOG_WARN,  CALLUI_LOG_TAG, "%s: %s(%d) > " fmt "\n", __FILE__, __func__, __LINE__, ##args); }
+#define err(fmt,args...)    { __dlog_print(LOG_ID_MAIN, DLOG_ERROR, CALLUI_LOG_TAG, "%s: %s(%d) > " fmt "\n", __FILE__, __func__, __LINE__, ##args); }
+#define fatal(fmt,args...)  { __dlog_print(LOG_ID_MAIN, DLOG_FATAL, CALLUI_LOG_TAG, "%s: %s(%d) > " fmt "\n", __FILE__, __func__, __LINE__, ##args); }
+
+#define sec_err(fmt, arg...)  {SECURE_LOGE(CALLUI_LOG_TAG, "%s: %s(%d) > " fmt "\n", __FILE__, __func__, __LINE__, ##arg); }
+#define sec_warn(fmt, arg...) {SECURE_LOGW(CALLUI_LOG_TAG, "%s: %s(%d) > " fmt "\n", __FILE__, __func__, __LINE__, ##arg); }
+#define sec_dbg(fmt, arg...)  {SECURE_LOGD(CALLUI_LOG_TAG, "%s: %s(%d) > " fmt "\n", __FILE__, __func__, __LINE__, ##arg); }
 
 #ifndef CALLUI_RETURN_IF_FAIL
 #define CALLUI_RETURN_IF_FAIL(check_condition) {\
index b95fd87..d8c1a14 100755 (executable)
@@ -152,13 +152,13 @@ static void __callui_spk_btn_cb(void *data, Evas_Object *obj, void *event_info)
        if (ad->speaker_status == EINA_TRUE) {
                ret = cm_speaker_off(ad->cm_handle);
                if (ret != CM_ERROR_NONE) {
-                       err("cm_speaker_off() is failed");
+                       err("cm_speaker_off() is failed. ret[%d]", ret);
                        return;
                }
        } else {
                ret = cm_speaker_on(ad->cm_handle);
                if (ret != CM_ERROR_NONE) {
-                       err("cm_speaker_on() is failed");
+                       err("cm_speaker_on() is failed. ret[%d]", ret);
                        return;
                }
        }
index 002623c..e42e67b 100755 (executable)
@@ -176,13 +176,13 @@ static void __callui_qp_spk_btn_cb(void *data, Evas_Object *obj, void *event_inf
        if (ad->speaker_status == EINA_TRUE) {
                ret = cm_speaker_off(ad->cm_handle);
                if (ret != CM_ERROR_NONE) {
-                       err("cm_speaker_off() is failed");
+                       err("cm_speaker_off() is failed. ret[%d]", ret);
                        return;
                }
        } else {
                ret = cm_speaker_on(ad->cm_handle);
                if (ret != CM_ERROR_NONE) {
-                       err("cm_speaker_off() is failed");
+                       err("cm_speaker_on() is failed. ret[%d]", ret);
                        return;
                }
        }