2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
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.
17 #ifndef __ACCOUNT_PARSER_DLOG_H__
18 #define __ACCOUNT_PARSER_DLOG_H__
22 #define COLOR_GREEN "\033[0;32m"
23 #define COLOR_END "\033[0;m"
29 #define LOG_TAG "ACCOUNT_PARSER"
31 #define _E(fmt, arg...) LOGE("[%s:%d] "fmt,__FUNCTION__,__LINE__,##arg)
32 #define _D(fmt, arg...) LOGD("[%s:%d] "fmt,__FUNCTION__,__LINE__,##arg)
33 #define _SECURE_E(fmt, arg...) SECURE_LOGE("[%s:%d] "fmt,__FUNCTION__,__LINE__,##arg)
34 #define _SECURE_D(fmt, arg...) SECURE_LOGD("[%s:%d] "fmt,__FUNCTION__,__LINE__,##arg)
35 #define ENTER() LOGD(COLOR_GREEN"BEGIN >>>"COLOR_END);
37 #define retvm_if(expr, val, fmt, arg...) do { \
40 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
45 #define retv_if(expr, val) do { \
47 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
52 #define retm_if(expr, fmt, arg...) do { \
55 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
60 #define ret_if(expr) do { \
62 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
67 #endif /* __ACCOUNT_PARSER_DLOG_H__ */