4 * Copyright (c) 2010-2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
7 * Genie Kim <daejins.kim@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
22 #ifndef __LOCATION_LOG_H__
23 #define __LOCATION_LOG_H__
26 * @file location-log.h
27 * @brief This file contains macro functions for logging.
31 #define TAG_LOCATION_FWK "LOCATION"
36 #define LOG_TAG TAG_LOCATION_FWK
39 #define LOCATION_LOGD(fmt, args...) LOGD(fmt, ##args)
40 #define LOCATION_LOGW(fmt, args...) LOGW(fmt, ##args)
41 #define LOCATION_LOGI(fmt, args...) LOGI(fmt, ##args)
42 #define LOCATION_LOGE(fmt, args...) LOGE(fmt, ##args)
43 #define LOCATION_SECLOG(fmt, args...) SECURE_LOGD(fmt, ##args)
45 #define _D(fmt, args...) LOGD(fmt, ##args)
46 #define _W(fmt, args...) LOGW(fmt, ##args)
47 #define _I(fmt, args...) LOGI(fmt, ##args)
48 #define _E(fmt, args...) LOGE(fmt, ##args)
50 #define LOC_IF_FAIL(ret, tag, fmt, arg...) \
51 do { if (ret != 0) { tag(fmt, ##arg); return ret; } } while (0)
53 #define LOC_IF_FAIL_LOG(ret, tag, fmt, arg...) \
54 do { if (ret != 0) tag(fmt, ##arg); } while (0)
56 #define LOC_COND_RET(cond, ret, tag, fmt, arg...) \
57 do { if (cond) { tag(fmt, ##arg); return ret; } } while (0)
59 #define LOC_COND_VOID(cond, tag, fmt, arg...) \
60 do { if (cond) { tag(fmt, ##arg); return ; } } while (0)
62 #define LOC_COND_LOG(cond, tag, fmt, arg...) \
63 do { if (cond) tag(fmt, ##arg); } while (0)
65 #define LOC_FUNC_LOG LOGI("%s", __func__);