4 * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #ifndef __DEF_common_H_
22 #define __DEF_common_H_
31 #define LOG_TAG "INDICATOR"
34 #define ERR(str, args...) LOGE("%s[%d]\t " #str "\n", \
35 __func__, __LINE__, ##args)
36 #define DBG(str, args...) LOGD("%s[%d]\t " #str "\n", \
37 __func__, __LINE__, ##args)
38 #define INFO(str, args...) LOGI(#str"\n", ##args)
40 #define SECURE_ERR(str, args...) SECURE_LOGE("%s[%d]\t " #str "\n", \
41 __func__, __LINE__, ##args)
42 #define SECURE_DBG(str, args...) SECURE_LOGD("%s[%d]\t " #str "\n", \
43 __func__, __LINE__, ##args)
44 #define SECURE_INFO(str, args...) SECURE_LOGI(#str"\n", ##args)
46 #elif FILE_DEBUG /*_DLOG_USED*/
47 #include "indicator_debug_util.h"
48 #define ERR(str, args...) debug_printf("%s[%d]\t " #str "\n", \
49 __func__, __LINE__, ##args)
50 #define DBG(str, args...) debug_printf("%s[%d]\t " #str "\n", \
51 __func__, __LINE__, ##args)
52 #define INFO(str, args...) debug_printf(#str"\n", ##args)
54 #define ERR(str, args...) fprintf(stderr, "%s[%d]\t " #str "\n",\
55 __func__, __LINE__, ##args)
56 #define DBG(str, args...) fprintf(stderr, "%s[%d]\t " #str "\n",\
57 __func__, __LINE__, ##args)
58 #define INFO(str, args...) fprintf(stderr, #str"\n", ##args)
61 #define retif(cond, ret, str, args...) do {\
67 #define ECORE_FILE_MONITOR_DELIF(p) ({if (p) {ecore_file_monitor_del(p); p = NULL; }})
69 #define gotoif(cond, target, str, args...) do {\