2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 #define LOG_TAG "CAPI_APPFW_APPLICATION_PREFERENCE"
24 #ifndef __PREFERENCE_LOG_H__
25 #define __PREFERENCE_LOG_H__
33 #define INFO(fmt, arg...)
34 #define DBG(fmt, arg...) SECURE_SLOGI(fmt, ##arg)
35 #define ERR(fmt, arg...) LOGE(fmt, ##arg)
36 #define SECURE_ERR(fmt, arg...) SECURE_SLOGE(fmt, ##arg)
37 #define FATAL(fmt, arg...) SECURE_SLOGF(fmt, ##arg)
38 #define WARN(fmt, arg...) SECURE_SLOGW(fmt, ##arg)
41 /************** Return ***************/
42 #define ret_if(expr) \
45 ERR("(%s) -> %s() return", #expr, __FUNCTION__); \
49 #define retv_if(expr, val) \
52 ERR("(%s) -> %s() return", #expr, __FUNCTION__); \
56 #define retm_if(expr, fmt, arg...) \
63 #define retvm_if(expr, val, fmt, arg...) \
70 #define retex_if(expr, fmt, arg...) \
79 /************** TimeCheck ***************/
80 #ifdef PREFERENCE_TIMECHECK
81 #define START_TIME_CHECK \
83 startT = set_start_time();
84 #define END_TIME_CHECK \
85 PREFERENCE_DEBUG("time = %f ms\n", exec_time(startT));
87 #define START_TIME_CHECK
88 #define END_TIME_CHECK
92 #endif /* __PREFERENCE_LOG_H__ */