commit | author | age
|
d6b4a7
|
1 |
/* |
G |
2 |
* coreMQTT v2.1.1 |
|
3 |
* Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
|
4 |
* |
|
5 |
* SPDX-License-Identifier: MIT |
|
6 |
* |
|
7 |
* Permission is hereby granted, free of charge, to any person obtaining a copy of |
|
8 |
* this software and associated documentation files (the "Software"), to deal in |
|
9 |
* the Software without restriction, including without limitation the rights to |
|
10 |
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
|
11 |
* the Software, and to permit persons to whom the Software is furnished to do so, |
|
12 |
* subject to the following conditions: |
|
13 |
* |
|
14 |
* The above copyright notice and this permission notice shall be included in all |
|
15 |
* copies or substantial portions of the Software. |
|
16 |
* |
|
17 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
18 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
19 |
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
20 |
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
21 |
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
22 |
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
23 |
*/ |
|
24 |
|
|
25 |
/** |
|
26 |
* @file core_mqtt_default_logging.h |
|
27 |
* @brief This represents the default values for the logging macros for the MQTT |
|
28 |
* library. |
|
29 |
* |
|
30 |
* @note This file SHOULD NOT be modified. If custom values are needed for |
|
31 |
* any configuration macro, a core_mqtt_config.h file should be provided to |
|
32 |
* the MQTT library to override the default values defined in this file. |
|
33 |
* To use the custom config file, the MQTT_DO_NOT_USE_CUSTOM_CONFIG preprocessor |
|
34 |
* macro SHOULD NOT be set. |
|
35 |
*/ |
|
36 |
|
|
37 |
#ifndef CORE_MQTT_DEFAULT_LOGGING_H_ |
|
38 |
#define CORE_MQTT_DEFAULT_LOGGING_H_ |
|
39 |
|
|
40 |
/* *INDENT-OFF* */ |
|
41 |
#ifdef __cplusplus |
|
42 |
extern "C" { |
|
43 |
#endif |
|
44 |
/* *INDENT-ON* */ |
|
45 |
|
|
46 |
/** |
|
47 |
* @brief Macro that is called in the MQTT library for logging "Error" level |
|
48 |
* messages. |
|
49 |
* |
|
50 |
* To enable error level logging in the MQTT library, this macro should be mapped to the |
|
51 |
* application-specific logging implementation that supports error logging. |
|
52 |
* |
|
53 |
* @note This logging macro is called in the MQTT library with parameters wrapped in |
|
54 |
* double parentheses to be ISO C89/C90 standard compliant. For a reference |
|
55 |
* POSIX implementation of the logging macros, refer to core_mqtt_config.h files, and the |
|
56 |
* logging-stack in demos folder of the |
|
57 |
* [AWS IoT Embedded C SDK repository](https://github.com/aws/aws-iot-device-sdk-embedded-C). |
|
58 |
* |
|
59 |
* <b>Default value</b>: Error logging is turned off, and no code is generated for calls |
|
60 |
* to the macro in the MQTT library on compilation. |
|
61 |
*/ |
|
62 |
#ifndef LogError |
|
63 |
#define LogError( message ) |
|
64 |
#endif |
|
65 |
|
|
66 |
/** |
|
67 |
* @brief Macro that is called in the MQTT library for logging "Warning" level |
|
68 |
* messages. |
|
69 |
* |
|
70 |
* To enable warning level logging in the MQTT library, this macro should be mapped to the |
|
71 |
* application-specific logging implementation that supports warning logging. |
|
72 |
* |
|
73 |
* @note This logging macro is called in the MQTT library with parameters wrapped in |
|
74 |
* double parentheses to be ISO C89/C90 standard compliant. For a reference |
|
75 |
* POSIX implementation of the logging macros, refer to core_mqtt_config.h files, and the |
|
76 |
* logging-stack in demos folder of the |
|
77 |
* [AWS IoT Embedded C SDK repository](https://github.com/aws/aws-iot-device-sdk-embedded-C/). |
|
78 |
* |
|
79 |
* <b>Default value</b>: Warning logs are turned off, and no code is generated for calls |
|
80 |
* to the macro in the MQTT library on compilation. |
|
81 |
*/ |
|
82 |
#ifndef LogWarn |
|
83 |
#define LogWarn( message ) |
|
84 |
#endif |
|
85 |
|
|
86 |
/** |
|
87 |
* @brief Macro that is called in the MQTT library for logging "Info" level |
|
88 |
* messages. |
|
89 |
* |
|
90 |
* To enable info level logging in the MQTT library, this macro should be mapped to the |
|
91 |
* application-specific logging implementation that supports info logging. |
|
92 |
* |
|
93 |
* @note This logging macro is called in the MQTT library with parameters wrapped in |
|
94 |
* double parentheses to be ISO C89/C90 standard compliant. For a reference |
|
95 |
* POSIX implementation of the logging macros, refer to core_mqtt_config.h files, and the |
|
96 |
* logging-stack in demos folder of the |
|
97 |
* [AWS IoT Embedded C SDK repository](https://github.com/aws/aws-iot-device-sdk-embedded-C/). |
|
98 |
* |
|
99 |
* <b>Default value</b>: Info logging is turned off, and no code is generated for calls |
|
100 |
* to the macro in the MQTT library on compilation. |
|
101 |
*/ |
|
102 |
#ifndef LogInfo |
|
103 |
#define LogInfo( message ) |
|
104 |
#endif |
|
105 |
|
|
106 |
/** |
|
107 |
* @brief Macro that is called in the MQTT library for logging "Debug" level |
|
108 |
* messages. |
|
109 |
* |
|
110 |
* To enable debug level logging from MQTT library, this macro should be mapped to the |
|
111 |
* application-specific logging implementation that supports debug logging. |
|
112 |
* |
|
113 |
* @note This logging macro is called in the MQTT library with parameters wrapped in |
|
114 |
* double parentheses to be ISO C89/C90 standard compliant. For a reference |
|
115 |
* POSIX implementation of the logging macros, refer to core_mqtt_config.h files, and the |
|
116 |
* logging-stack in demos folder of the |
|
117 |
* [AWS IoT Embedded C SDK repository](https://github.com/aws/aws-iot-device-sdk-embedded-C/). |
|
118 |
* |
|
119 |
* <b>Default value</b>: Debug logging is turned off, and no code is generated for calls |
|
120 |
* to the macro in the MQTT library on compilation. |
|
121 |
*/ |
|
122 |
#ifndef LogDebug |
|
123 |
#define LogDebug( message ) |
|
124 |
#endif |
|
125 |
|
|
126 |
/* *INDENT-OFF* */ |
|
127 |
#ifdef __cplusplus |
|
128 |
} |
|
129 |
#endif |
|
130 |
/* *INDENT-ON* */ |
|
131 |
|
|
132 |
#endif /* ifndef CORE_MQTT_DEFAULT_LOGGING_H_ */ |