2 * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 * http://www.apache.org/licenses/LICENSE-2.0
7 * Unless required by applicable law or agreed to in writing, software
8 * distributed under the License is distributed on an "AS IS" BASIS,
9 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 * See the License for the specific language governing permissions and
11 * limitations under the License.
14 #ifndef __STT_DLOG_H__
15 #define __STT_DLOG_H__
23 #define LOG_TAG LOG_TAG_STT
25 #define COLOR_RED "\033[0;31m"
26 #define COLOR_GREEN "\033[0;32m"
27 #define COLOR_BROWN "\033[0;33m"
28 #define COLOR_BLUE "\033[0;34m"
29 #define COLOR_PURPLE "\033[0;35m"
30 #define COLOR_CYAN "\033[0;36m"
31 #define COLOR_LIGHTBLUE "\033[0;37m"
32 #define COLOR_END "\033[0;m"
34 #define PLOG(fmt, args...) LOGD(fmt, ##args)
35 #define PINFO(fmt, args...) LOGI(COLOR_PURPLE fmt COLOR_END, ##args)
36 #define PWARNING(fmt, args...) LOGW(COLOR_BLUE fmt COLOR_END, ##args)
37 #define PERR(fmt, args...) LOGE(COLOR_RED fmt COLOR_END, ##args)
38 #define PENTER() LOGD(COLOR_GREEN "BEGIN >>>>" COLOR_END)
39 #define PLEAVE() LOGD(COLOR_GREEN "END <<<<" COLOR_END)
41 #define RET_IF(expr) \
47 #define RETV_IF(expr, val) \
53 #define RETM_IF(expr, fmt, arg...) \
61 #define RETVM_IF(expr, val, fmt, arg...) \
69 #endif /* __STT_DLOG_H__ */