2 * Copyright (c) 2009 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
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.
19 #ifndef __LOCKSCREEN_OPTIONS_DEBUG_H__
20 #define __LOCKSCREEN_OPTIONS_DEBUG_H__
24 #define FONT_CLEAR "\033[0m"
25 #define FONT_COLOR_RED "\033[31m"
27 #define OPENLOCK_USING_PLATFORM_DEBUG
29 #ifdef OPENLOCK_USING_PLATFORM_DEBUG
35 #define LOCKOPTIONS_DBG(fmt, args...) LOGD("["LOG_TAG"%s:%d:D] "fmt, __func__, __LINE__, ##args)
36 #define LOCKOPTIONS_WARN(fmt, args...) LOGW("["LOG_TAG"%s:%d:W] "fmt, __func__, __LINE__, ##args)
37 #define LOCKOPTIONS_ERR(fmt, args...) LOGE("["LOG_TAG"%s:%d:E] "fmt, __func__, __LINE__, ##args)
40 #define LOCKOPTIONS_DBG(fmt, args...) do{printf("[LOCKOPTIONS_DBG][%s(%d)] "fmt " \n", __FILE__, __LINE__, ##args);}while(0);
41 #define LOCKOPTIONS_WARN(fmt, args...) do{printf("[LOCKOPTIONS_WARN][%s(%d)] "fmt " \n", __FILE__, __LINE__, ##args);}while(0);
42 #define LOCKOPTIONS_ERR(fmt, args...) do{printf("[LOCKOPTIONS_ERR][%s(%d)] "fmt " \n", __FILE__, __LINE__, ##args);}while(0);
43 #endif /* LOCKD_USING_PLATFORM_DEBUG */
45 #define LOCKOPTIONS_TRACE_BEGIN do {\
47 LOGW("ENTER FUNCTION: %s.\n", __FUNCTION__);\
51 #define LOCKOPTIONS_TRACE_END do {\
53 LOGW("EXIT FUNCTION: %s.\n", __FUNCTION__);\
57 #define ret_if(expr) do { \
59 LOCKHELP_ERR("(%s) -> %s() return", #expr, __FUNCTION__); \
71 #endif /* __OPENLOCK_SETTING_DEBUG_H__ */