sensord: add sensorctl instead of original sensor-test
[platform/core/system/sensord.git] / src / sensorctl / sensorctl_log.h
1 /*
2  * sensorctl
3  *
4  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
5  *
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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  */
19
20 #pragma once // _SENSORCTL_LOG_H_
21
22 #include <glib.h>
23 #include <stdio.h>
24
25 #define KNRM  "\x1B[0m"
26 #define KRED  "\x1B[31m"
27 #define KGRN  "\x1B[32m"
28 #define KYEL  "\x1B[33m"
29 #define KBLU  "\x1B[34m"
30 #define KMAG  "\x1B[35m"
31 #define KCYN  "\x1B[36m"
32 #define KWHT  "\x1B[37m"
33 #define RESET "\033[0m"
34
35 #define PRINT(fmt, args...) \
36         do { \
37                 g_print(fmt, ##args); \
38         } while (0)
39
40 #define _E(fmt, args...) \
41         do { \
42                 g_print("\x1B[31m" fmt "\033[0m", ##args); \
43         } while (0)
44
45 #define _I(fmt, args...) \
46         do { \
47                 g_print("\x1B[32m" fmt "\033[0m", ##args); \
48         } while (0)
49