journalloglevel.h
Go to the documentation of this file.
1 
2 // Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without modification,
6 // are permitted provided that the following conditions are met:
7 //
8 // 1. Redistributions of source code must retain the above copyright notice,
9 // this list of conditions, and the following disclaimer.
10 //
11 // 2. Redistributions in binary form must reproduce the above copyright notice,
12 // this list of conditions, and the following disclaimer in the documentation
13 // and/or other materials provided with the distribution.
14 //
15 // 3. Neither the names of the copyright holders nor the names of their contributors
16 // may be used to endorse or promote products derived from this software without
17 // specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 // THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
24 // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
26 // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
28 // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
29 // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
30 // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
31 //
32 
33 
34 // Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
35 // All rights reserved.
36 //
37 // Redistribution and use in source and binary forms, with or without modification,
38 // are permitted provided that the following conditions are met:
39 //
40 // 1. Redistributions of source code must retain the above copyright notice,
41 // this list of conditions, and the following disclaimer.
42 //
43 // 2. Redistributions in binary form must reproduce the above copyright notice,
44 // this list of conditions, and the following disclaimer in the documentation
45 // and/or other materials provided with the distribution.
46 //
47 // 3. Neither the names of the copyright holders nor the names of their contributors
48 // may be used to endorse or promote products derived from this software without
49 // specific prior written permission.
50 //
51 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
52 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
53 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
54 // THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55 // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
56 // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
58 // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
59 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
60 // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
61 // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
62 // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
63 //
64 
65 #ifndef JOURNALLOGLEVEL_H
66 #define JOURNALLOGLEVEL_H
67 
68 #ifdef ANDROID
69  #include <android/log.h>
70 
71  #define JLL_TRACE ANDROID_LOG_VERBOSE
72  #define JLL_DEBUG ANDROID_LOG_DEBUG
73  #define JLL_ALERT ANDROID_LOG_WARN
74  #define JLL_ERROR ANDROID_LOG_ERROR
75  #define JLL_FATAL ANDROID_LOG_FATAL
76  #define JLL_WRITE ANDROID_LOG_SILENT
77  #define JLL_DISABLE (JLL_WRITE+1)
78 #else
79  #define JLL_TRACE 0
80  #define JLL_DEBUG 1
81  #define JLL_ALERT 2
82  #define JLL_ERROR 3
83  #define JLL_FATAL 4
84  #define JLL_WRITE 5
85  #define JLL_DISABLE 6
86 #endif
87 
89 {
97 };
98 
99 #ifdef NO_JOURNALLER
100  #undef JLDEF_BUILD
101  #undef JLDEF_FILE
102  #undef JLDEF_DEBUGGER
103  #define JLDEF_BUILD JLL_DISABLE
104  #define JLDEF_FILE JLL_Disable
105  #define JLDEF_DEBUGGER JLL_Disable
106 #endif
107 
108 #ifdef XSENS_DEBUG
109  #ifndef XSENS_RELEASE
110  // full debug
111  #ifndef JLDEF_BUILD
112  #define JLDEF_BUILD JLL_DEBUG // 'trace' needs to be enabled explicitly since it potentially has a huge impact on performance
113  #endif
114  #ifndef JLDEF_FILE
115  #define JLDEF_FILE JLL_Debug
116  #endif
117  #ifndef JLDEF_DEBUGGER
118  #define JLDEF_DEBUGGER JLL_Alert
119  #endif
120  #else
121  // Release With Debug Info (non-optimized Release build)
122  #ifndef JLDEF_BUILD
123  #define JLDEF_BUILD JLL_DEBUG
124  #endif
125  #ifndef JLDEF_FILE
126  #define JLDEF_FILE JLL_Debug
127  #endif
128  #ifndef JLDEF_DEBUGGER
129  #define JLDEF_DEBUGGER JLL_Error
130  #endif
131  #endif
132 #else
133  // Full optimized Release build, logging should be reduced to a minimum
134  #ifndef JLDEF_BUILD
135  #define JLDEF_BUILD JLL_ALERT
136  #endif
137  #ifndef JLDEF_FILE
138  #define JLDEF_FILE JLL_Alert
139  #endif
140  #ifndef JLDEF_DEBUGGER
141  #define JLDEF_DEBUGGER JLL_Fatal
142  #endif
143  #define JLNOLINEINFO
144 #endif
145 
146 #endif
JLL_DEBUG
#define JLL_DEBUG
Definition: journalloglevel.h:80
JLL_Disable
@ JLL_Disable
don't log any messages
Definition: journalloglevel.h:96
JLL_Write
@ JLL_Write
only log 'write' messages
Definition: journalloglevel.h:95
JLL_Error
@ JLL_Error
only log fatal and error messages
Definition: journalloglevel.h:93
JournalLogLevel
JournalLogLevel
Definition: journalloglevel.h:88
JLL_Trace
@ JLL_Trace
log all messages, including function entry/exit
Definition: journalloglevel.h:90
JLL_DISABLE
#define JLL_DISABLE
Definition: journalloglevel.h:85
JLL_Alert
@ JLL_Alert
only log fatal, error and alert messages
Definition: journalloglevel.h:92
JLL_Debug
@ JLL_Debug
log all messages, except function entry/exit (trace)
Definition: journalloglevel.h:91
JLL_FATAL
#define JLL_FATAL
Definition: journalloglevel.h:83
JLL_TRACE
#define JLL_TRACE
Definition: journalloglevel.h:79
JLL_Fatal
@ JLL_Fatal
only log fatal messages
Definition: journalloglevel.h:94
JLL_ERROR
#define JLL_ERROR
Definition: journalloglevel.h:82
JLL_ALERT
#define JLL_ALERT
Definition: journalloglevel.h:81
JLL_WRITE
#define JLL_WRITE
Definition: journalloglevel.h:84


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:20