1 /* ****************************************************************
3 * Copyright 2017 Samsung Electronics All Rights Reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 ******************************************************************/
30 #define LOG_TAG "SMART_LIGHT"
32 #define _E(fmt, args...) dlog_print(DLOG_ERROR, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args)
33 #define _W(fmt, args...) dlog_print(DLOG_WARN, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args)
34 #define _I(fmt, args...) dlog_print(DLOG_INFO, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args)
35 #define _D(fmt, args...) dlog_print(DLOG_DEBUG, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args)
37 #define FN_CALL dlog_print(DLOG_DEBUG, LOG_TAG, ">>>>>>>> %s() called\n", __func__)
38 #define FN_END dlog_print(DLOG_DEBUG, LOG_TAG, "<<<<<<<< %s() ended\n", __func__)
41 #define retvm_if(expr, val, fmt, arg...) do { \
44 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
49 #define retv_if(expr, val) do { \
51 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
56 #define retm_if(expr, fmt, arg...) do { \
59 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
64 #define ret_if(expr) do { \
66 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
71 #define goto_if(expr, val) do { \
73 _E("(%s) -> goto", #expr); \
78 #define break_if(expr) { \
80 _E("(%s) -> break", #expr); \
85 #define continue_if(expr) { \
87 _E("(%s) -> continue", #expr); \
96 #endif /* __LOG_H__ */