4 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #pragma once /* __LOG_H__ */
25 #define _NRM "\x1B[0m"
26 #define _RED "\x1B[31m"
27 #define _GRN "\x1B[32m"
28 #define _YEL "\x1B[33m"
29 #define _BLU "\x1B[34m"
30 #define _MAG "\x1B[35m"
31 #define _CYN "\x1B[36m"
32 #define _WHT "\x1B[37m"
33 #define _RST "\033[0m"
35 #define _N(fmt, args...) \
37 g_print(fmt, ##args); \
40 #define _E(fmt, args...) \
42 g_print("\x1B[31m" fmt "\033[0m", ##args); \
45 #define _I(fmt, args...) \
47 g_print("\x1B[32m" fmt "\033[0m", ##args); \
50 #define WARN_IF(expr, fmt, arg...) \
57 #define RET_IF(expr) \
64 #define RETV_IF(expr, val) \
71 #define RETM_IF(expr, fmt, arg...) \
79 #define RETVM_IF(expr, val, fmt, arg...) \