2 * Copyright (c) 2011 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.
17 #ifndef __MM_WFD_SINK_DLOG_H__
18 #define __MM_WFD_SINK_DLOG_H__
24 #endif /* __cplusplus */
29 #define LOG_TAG "MM_WFD_SINK"
31 #define FONT_COLOR_RESET "\033[0m"
32 #define FONT_COLOR_RED "\033[31m"
33 #define FONT_COLOR_GREEN "\033[32m"
34 #define FONT_COLOR_YELLOW "\033[33m"
35 #define FONT_COLOR_BLUE "\033[34m"
36 #define FONT_COLOR_PURPLE "\033[35m"
37 #define FONT_COLOR_CYAN "\033[36m"
38 #define FONT_COLOR_GRAY "\033[37m"
40 #define wfd_sink_debug(fmt, arg...) do { \
41 LOGD(FONT_COLOR_RESET""fmt"", ##arg); \
44 #define wfd_sink_info(fmt, arg...) do { \
45 LOGI(FONT_COLOR_GREEN""fmt""FONT_COLOR_RESET, ##arg); \
48 #define wfd_sink_error(fmt, arg...) do { \
49 LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
52 #define wfd_sink_warning(fmt, arg...) do { \
53 LOGW(FONT_COLOR_YELLOW""fmt""FONT_COLOR_RESET, ##arg); \
56 #define wfd_sink_debug_fenter() do { \
57 LOGD(FONT_COLOR_RESET"<Enter>"); \
60 #define wfd_sink_debug_fleave() do { \
61 LOGD(FONT_COLOR_RESET"<Leave>"); \
64 #define wfd_sink_error_fenter() do { \
65 LOGE(FONT_COLOR_RESET"NO-ERROR : <Enter>"); \
68 #define wfd_sink_error_fleave() do { \
69 LOGE(FONT_COLOR_RESET"NO-ERROR : <Leave>"); \
72 #define wfd_sink_sucure_info(fmt, arg...) do { \
73 SECURE_LOGI(FONT_COLOR_GREEN""fmt""FONT_COLOR_RESET, ##arg); \
76 #define wfd_sink_return_if_fail(expr) \
78 wfd_sink_error(FONT_COLOR_RED"failed [%s]\n"FONT_COLOR_RESET, #expr); \
82 #define wfd_sink_return_val_if_fail(expr, val) \
84 wfd_sink_error(FONT_COLOR_RED"failed [%s]\n"FONT_COLOR_RESET, #expr); \
88 #define wfd_sink_assert_not_reached() \
90 wfd_sink_error(FONT_COLOR_RED"assert_not_reached()"FONT_COLOR_RESET); \
97 #endif /* __cplusplus */
99 #endif /* __MM_WFD_SINK_DLOG_H__ */