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.
20 #ifndef __TASK_MGR_LOG_H__
21 #define __TASK_MGR_LOG_H__
27 #define LOG_TAG "TASK_MGR"
30 #define _SD(fmt, arg...) SECURE_LOGD(fmt"\n", ##arg)
34 #define _SW(fmt, arg...) SECURE_LOGW(fmt"\n", ##arg)
38 #define _SE(fmt, arg...) SECURE_LOGE(fmt"\n", ##arg)
41 #define retvm_if_timer(timer, expr, val, fmt, arg...) do { \
44 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
50 #define retvm_if(expr, val, fmt, arg...) do { \
53 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
58 #define retv_if(expr, val) do { \
60 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
65 #define retm_if(expr, fmt, arg...) do { \
68 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
73 #define ret_if(expr) do { \
75 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
80 #define goto_if(expr, val) do { \
82 _E("(%s) -> goto", #expr); \
87 #define break_if(expr) { \
89 _E("(%s) -> break", #expr); \
94 #define continue_if(expr) { \
96 _E("(%s) -> continue", #expr); \
101 #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
104 #define _D(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "%s: %s[%d] " #fmt "\n", __FILENAME__, __func__, __LINE__, ##arg)
108 #define _W(fmt, arg...) dlog_print(DLOG_WARN, LOG_TAG, "%s: %s[%d] " #fmt "\n", __FILENAME__, __func__, __LINE__, ##arg)
112 #define _E(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "%s: %s[%d] " #fmt "\n", __FILENAME__, __func__, __LINE__, ##arg)
116 #endif //__TASK_MGR_LOG_H__