Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
- name: Arduino_ConnectionHandler
- name: ArduinoHttpClient
- name: Arduino_DebugUtils
- source-url: https://github.com/arduino-libraries/Arduino_DebugUtils.git
version: logging-improvements
- name: ArduinoMqttClient
- name: Arduino_SecureElement
- name: Arduino_CloudUtils
Expand Down
32 changes: 15 additions & 17 deletions src/AIoTC_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,22 @@
#define NTP_USE_RANDOM_PORT (1)
#endif

#ifndef DEBUG_ERROR
#define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
#endif

#ifndef DEBUG_WARNING
#define DEBUG_WARNING(fmt, ...) Debug.print(DBG_WARNING, fmt, ## __VA_ARGS__)
#endif

#ifndef DEBUG_INFO
#define DEBUG_INFO(fmt, ...) Debug.print(DBG_INFO, fmt, ## __VA_ARGS__)
#endif
// include directives must be ordered in such a way that this always comes first,
// otherwise the log level will be incorrectly set
#ifndef DEBUG_LEVEL
#define DEBUG_LEVEL DEBUG_LEVEL_INFO
#endif // DEBUG_LEVEL

#ifndef DEBUG_DEBUG
#define DEBUG_DEBUG(fmt, ...) Debug.print(DBG_DEBUG, fmt, ## __VA_ARGS__)
#endif

#ifndef DEBUG_VERBOSE
#define DEBUG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__)
#if defined __has_include
#if !__has_include (<Arduino_DebugUtils.h>)
#define DEBUG_ERROR (void) 0
#define DEBUG_WARNING (void) 0
#define DEBUG_INFO (void) 0
#define DEBUG_DEBUG (void) 0
#define DEBUG_VERBOSE (void) 0
#elif defined(__cplusplus)
#include <Arduino_DebugUtils.h>
#endif
#endif

/******************************************************************************
Expand Down
Loading