AWS IoT Device SDK C  202009.00
SDK for connecting to AWS IoT from a device using embedded C.
logging_levels.h File Reference

Defines the logging level macros. More...

Go to the source code of this file.

Macros

#define LOG_NONE   0
 No log messages. More...
 
#define LOG_ERROR   1
 Represents erroneous application state or event. More...
 
#define LOG_WARN   2
 Message about an abnormal event. More...
 
#define LOG_INFO   3
 A helpful, informational message. More...
 
#define LOG_DEBUG   4
 Detailed and excessive debug information. More...
 
#define LIBRARY_LOG_LEVEL   LOG_ERROR
 The logging level verbosity configuration of log messages from library. More...
 

Detailed Description

Defines the logging level macros.

Macro Definition Documentation

◆ LOG_NONE

#define LOG_NONE   0

No log messages.

When LIBRARY_LOG_LEVEL is LOG_NONE, logging is disabled and no logging messages are printed.

◆ LOG_ERROR

#define LOG_ERROR   1

Represents erroneous application state or event.

These messages describe the situations when a library encounters an error from which it cannot recover.

These messages are printed when LIBRARY_LOG_LEVEL is defined as either of LOG_ERROR, LOG_WARN, LOG_INFO or LOG_DEBUG.

◆ LOG_WARN

#define LOG_WARN   2

Message about an abnormal event.

These messages describe the situations when a library encounters abnormal event that may be indicative of an error. Libraries continue execution after logging a warning.

These messages are printed when LIBRARY_LOG_LEVEL is defined as either of LOG_WARN, LOG_INFO or LOG_DEBUG.

◆ LOG_INFO

#define LOG_INFO   3

A helpful, informational message.

These messages describe normal execution of a library. They provide the progress of the program at a coarse-grained level.

These messages are printed when LIBRARY_LOG_LEVEL is defined as either of LOG_INFO or LOG_DEBUG.

◆ LOG_DEBUG

#define LOG_DEBUG   4

Detailed and excessive debug information.

Debug log messages are used to provide the progress of the program at a fine-grained level. These are mostly used for debugging and may contain excessive information such as internal variables, buffers, or other specific information.

These messages are only printed when LIBRARY_LOG_LEVEL is defined as LOG_DEBUG.

◆ LIBRARY_LOG_LEVEL

#define LIBRARY_LOG_LEVEL   LOG_ERROR

The logging level verbosity configuration of log messages from library.

The logging verbosity levels are one of LOG_DEBUG, LOG_INFO, LOG_WARN, and LOG_ERROR.

  • With level LOG_NONE, logging will be disabled.
  • With level LOG_DEBUG, all log messages will print.
  • With level LOG_INFO, all log messages, except level LOG_DEBUG, will print.
  • With level LOG_WARN, only messages this level and LOG_ERROR level will print.
  • With level LOG_ERROR, only messages at this level will print.