f8b2f49df5e6eca0c9987b0b53515e8287d74b66
[apps/home/b2-clocksetting.git] / include / setting_debug.h
1 /*
2  * Copyright (c) 2010 Samsung Electronics, Inc.
3  * All rights reserved.
4  *
5  * This software is a confidential and proprietary information
6  * of Samsung Electronics, Inc. ("Confidential Information").  You
7  * shall not disclose such Confidential Information and shall use
8  * it only in accordance with the terms of the license agreement
9  * you entered into with Samsung Electronics.
10  */
11 #define _DLOG_USED
12 #ifdef  _DLOG_USED
13
14 #include <dlog.h>
15
16 #ifdef LOG_TAG
17 #undef LOG_TAG
18 #define LOG_TAG "W-SETTING"
19 #endif
20
21 #define DBG(fmt , args...) \
22         do { \
23                 LOGD("[%s : %d] "fmt"", __func__, __LINE__, ##args); \
24         } while (0)
25
26 #define INFO(fmt , args...) \
27         do { \
28                 LOGI("[%s : %d] "fmt"", __func__, __LINE__, ##args); \
29         } while (0)
30
31 #define WARN(fmt , args...) \
32         do { \
33                 LOGI("[%s : %d] "fmt"", __func__, __LINE__, ##args); \
34         } while (0)
35
36 #define ERR(fmt , args...) \
37         do { \
38                 LOGI("[%s : %d] "fmt"", __func__, __LINE__, ##args); \
39         } while (0)
40
41
42 #define __FREE(del, arg) do { \
43                 if(arg) { \
44                         del((void *)(arg)); /*cast any argument to (void*) to avoid build warring*/\
45                         arg = NULL; \
46                 } \
47         } while (0);
48
49 #define FREE(arg) __FREE(free, arg)
50
51 #endif