2 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
4 * Contact: junsuk. oh <junsuk77.oh@samsung.com>
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.
20 #ifndef __PKGMGR_CLIENT_DEBUG_H__
21 #define __PKGMGR_CLIENT_DEBUG_H__
28 #define LOG_TAG "PKGMGR"
31 #define ERR(fmt, args...) LOGE("[%s:%d] "fmt"\n", __func__, __LINE__, ##args)
35 #define DBG(fmt, args...) LOGD("[%s:%d] "fmt"\n", __func__, __LINE__, ##args)
39 #define INFO(fmt, args...) LOGI("[%s:%d] "fmt"\n", __func__, __LINE__, ##args)
42 #define ret_if(expr) \
45 ERR("(%s) ", #expr); \
50 #define retm_if(expr, fmt, arg...) \
53 ERR("(%s) "fmt, #expr, ##arg); \
58 #define retv_if(expr, val) \
61 ERR("(%s) ", #expr); \
66 #define retvm_if(expr, val, fmt, arg...) \
69 ERR("(%s) "fmt, #expr, ##arg); \
74 #define trym_if(expr, fmt, arg...) \
77 ERR("(%s) "fmt, #expr, ##arg); \
82 #define tryvm_if(expr, val, fmt, arg...) \
85 ERR("(%s) "fmt, #expr, ##arg); \
91 #endif /* __PKGMGR_CLIENT_DEBUG_H__ */