]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries/c_sdk/standard/common/include/private/iot_logging.h
Remove the FreeRTOS-IoT-Libraries from FreeRTOS-Plus as it was an old copy with a...
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-IoT-Libraries / c_sdk / standard / common / include / private / iot_logging.h
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries/c_sdk/standard/common/include/private/iot_logging.h b/FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries/c_sdk/standard/common/include/private/iot_logging.h
deleted file mode 100644 (file)
index 377dd69..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-/*\r
- * Amazon FreeRTOS Common V1.0.0\r
- * Copyright (C) 2018 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
- * this software and associated documentation files (the "Software"), to deal in\r
- * the Software without restriction, including without limitation the rights to\r
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
- * the Software, and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be included in all\r
- * copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- *\r
- * http://aws.amazon.com/freertos\r
- * http://www.FreeRTOS.org\r
- */\r
-\r
-/**\r
- * @file iot_logging.h\r
- * @brief Generic logging function header file.\r
- *\r
- * Declares the generic logging function and the log levels. This file never\r
- * needs to be included in source code. The header iot_logging_setup.h should\r
- * be included instead.\r
- *\r
- * @see iot_logging_setup.h\r
- */\r
-\r
-#ifndef IOT_LOGGING_H_\r
-#define IOT_LOGGING_H_\r
-\r
-/* The config header is always included first. */\r
-#include "iot_config.h"\r
-\r
-/* Standard includes. */\r
-#include <stdbool.h>\r
-#include <stddef.h>\r
-#include <stdint.h>\r
-\r
-/**\r
- * @constantspage{logging,logging library}\r
- *\r
- * @section logging_constants_levels Log levels\r
- * @brief Log levels for the libraries in this SDK.\r
- *\r
- * Each library should specify a log level by setting @ref LIBRARY_LOG_LEVEL.\r
- * All log messages with a level at or below the specified level will be printed\r
- * for that library.\r
- *\r
- * Currently, there are 4 log levels. In the order of lowest to highest, they are:\r
- * - #IOT_LOG_NONE <br>\r
- *   @copybrief IOT_LOG_NONE\r
- * - #IOT_LOG_ERROR <br>\r
- *   @copybrief IOT_LOG_ERROR\r
- * - #IOT_LOG_WARN <br>\r
- *   @copybrief IOT_LOG_WARN\r
- * - #IOT_LOG_INFO <br>\r
- *   @copybrief IOT_LOG_INFO\r
- * - #IOT_LOG_DEBUG <br>\r
- *   @copybrief IOT_LOG_DEBUG\r
- */\r
-\r
-/**\r
- * @brief No log messages.\r
- *\r
- * Log messages with this level will be silently discarded. When @ref\r
- * LIBRARY_LOG_LEVEL is #IOT_LOG_NONE, logging is disabled and no [logging functions]\r
- * (@ref logging_functions) can be called.\r
- */\r
-#define IOT_LOG_NONE     0\r
-\r
-/**\r
- * @brief Only critical, unrecoverable errors.\r
- *\r
- * Log messages with this level will be printed when a library encounters an\r
- * error from which it cannot easily recover.\r
- */\r
-#define IOT_LOG_ERROR    1\r
-\r
-/**\r
- * @brief Message about an abnormal but recoverable event.\r
- *\r
- * Log messages with this level will be printed when a library encounters an\r
- * abnormal event that may be indicative of an error. Libraries should continue\r
- * execution after logging a warning.\r
- */\r
-#define IOT_LOG_WARN     2\r
-\r
-/**\r
- * @brief A helpful, informational message.\r
- *\r
- * Log messages with this level may indicate the normal status of a library\r
- * function. They should be used to track how far a program has executed.\r
- */\r
-#define IOT_LOG_INFO     3\r
-\r
-/**\r
- * @brief Detailed and excessive debug information.\r
- *\r
- * Log messages with this level are intended for developers. They may contain\r
- * excessive information such as internal variables, buffers, or other specific\r
- * information.\r
- */\r
-#define IOT_LOG_DEBUG    4\r
-\r
-/**\r
- * @paramstructs{logging,logging}\r
- */\r
-\r
-/**\r
- * @ingroup logging_datatypes_paramstructs\r
- * @brief Log message configuration struct.\r
- *\r
- * @paramfor @ref logging_function_log, @ref logging_function_generic\r
- *\r
- * By default, log messages print the library name, log level, and a timestring.\r
- * This struct can be passed to @ref logging_function_generic to disable one of\r
- * the above components in the log message.\r
- *\r
- * <b>Example:</b>\r
- *\r
- * @code{c}\r
- * IotLog_Generic( IOT_LOG_DEBUG, "SAMPLE", IOT_LOG_DEBUG, NULL, "Hello world!" );\r
- * @endcode\r
- * The code above prints the following message:\r
- * @code\r
- * [DEBUG][SAMPLE][2018-01-01 12:00:00] Hello world!\r
- * @endcode\r
- *\r
- * The timestring can be disabled as follows:\r
- * @code\r
- * IotLogConfig_t logConfig = { .hideLogLevel = false, .hideLibraryName = false, .hideTimestring = true};\r
- * IotLog_Generic( IOT_LOG_DEBUG, "SAMPLE", IOT_LOG_DEBUG, &logConfig, "Hello world!" );\r
- * @endcode\r
- * The resulting log message will be:\r
- * @code\r
- * [DEBUG][SAMPLE] Hello world!\r
- * @endcode\r
- */\r
-typedef struct IotLogConfig\r
-{\r
-    bool hideLogLevel;    /**< @brief Don't print the log level string for this message. */\r
-    bool hideLibraryName; /**< @brief Don't print the library name for this message. */\r
-    bool hideTimestring;  /**< @brief Don't print the timestring for this message. */\r
-} IotLogConfig_t;\r
-\r
-/**\r
- * @functionspage{logging,logging library}\r
- *\r
- * - @functionname{logging_function_log}\r
- * - @functionname{logging_function_printbuffer}\r
- * - @functionname{logging_function_generic}\r
- * - @functionname{logging_function_genericprintbuffer}\r
- */\r
-\r
-/**\r
- * @functionpage{IotLog_Generic,logging,generic}\r
- * @functionpage{IotLog_PrintBuffer,logging,genericprintbuffer}\r
- */\r
-\r
-/**\r
- * @brief Generic logging function that prints a single message.\r
- *\r
- * This function is the generic logging function shared across all libraries.\r
- * The library-specific logging function @ref logging_function_log is implemented\r
- * using this function. Like @ref logging_function_log, this function is only\r
- * available when @ref LIBRARY_LOG_LEVEL is #IOT_LOG_NONE.\r
- *\r
- * In most cases, the library-specific logging function @ref logging_function_log\r
- * should be called instead of this function.\r
- *\r
- * @param[in] libraryLogSetting The log level setting of the library, used to\r
- * determine if the log message should be printed. Must be one of the @ref\r
- * logging_constants_levels.\r
- * @param[in] pLibraryName The library name to print. See @ref LIBRARY_LOG_NAME.\r
- * @param[in] messageLevel The log level of the this message. See @ref LIBRARY_LOG_LEVEL.\r
- * @param[in] pLogConfig Pointer to a #IotLogConfig_t. Optional; pass `NULL` to ignore.\r
- * @param[in] pFormat Format string for the log message.\r
- * @param[in] ... Arguments for format specification.\r
- *\r
- * @return No return value. On errors, it prints nothing.\r
- */\r
-/* @[declare_logging_generic] */\r
-void IotLog_Generic( int libraryLogSetting,\r
-                     const char * const pLibraryName,\r
-                     int messageLevel,\r
-                     const IotLogConfig_t * const pLogConfig,\r
-                     const char * const pFormat,\r
-                     ... );\r
-/* @[declare_logging_generic] */\r
-\r
-/**\r
- * @brief Generic function to log the contents of a buffer as bytes.\r
- *\r
- * This function is the generic buffer logging function shared across all libraries.\r
- * The library-specific buffer logging function @ref logging_function_printbuffer is\r
- * implemented using this function. Like @ref logging_function_printbuffer, this\r
- * function is only available when @ref LIBRARY_LOG_LEVEL is #IOT_LOG_DEBUG.\r
- *\r
- * In most cases, the library-specific buffer logging function @ref\r
- * logging_function_printbuffer should be called instead of this function.\r
- *\r
- * @param[in] pLibraryName The library name to print with the log. See @ref LIBRARY_LOG_NAME.\r
- * @param[in] pHeader A message to print before printing the buffer.\r
- * @param[in] pBuffer The buffer to print.\r
- * @param[in] bufferSize The number of bytes in `pBuffer` to print.\r
- *\r
- * @return No return value. On errors, it prints nothing.\r
- *\r
- * @note To conserve memory, this function only allocates enough memory for a\r
- * single line of output. Therefore, in multithreaded systems, its output may\r
- * appear "fragmented" if other threads are logging simultaneously.\r
- */\r
-/* @[declare_logging_genericprintbuffer] */\r
-void IotLog_GenericPrintBuffer( const char * const pLibraryName,\r
-                                const char * const pHeader,\r
-                                const uint8_t * const pBuffer,\r
-                                size_t bufferSize );\r
-/* @[declare_logging_genericprintbuffer] */\r
-\r
-#endif /* ifndef IOT_LOGGING_H_ */\r