Skip to content

Commit 2cac6a7

Browse files
fixup! Improving Logging by using Arduino_DebugUtils pull #48
1 parent dba6ca8 commit 2cac6a7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/AIoTC_Config.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,26 @@
3434
#define NTP_USE_RANDOM_PORT (1)
3535
#endif
3636

37+
// include directives must be ordered in such a way that this always comes first,
38+
// otherwise the log level will be incorrectly set
39+
#ifndef DEBUG_LEVEL
40+
#define DEBUG_LEVEL DEBUG_LEVEL_INFO
41+
#endif // DEBUG_LEVEL
42+
3743
#if defined __has_include
3844
#if !__has_include (<Arduino_DebugUtils.h>)
3945
#define DEBUG_ERROR (void) 0
4046
#define DEBUG_WARNING (void) 0
4147
#define DEBUG_INFO (void) 0
4248
#define DEBUG_DEBUG (void) 0
4349
#define DEBUG_VERBOSE (void) 0
50+
#else
51+
#include <Arduino_DebugUtils.h>
4452
#endif
4553
#endif
4654

47-
// include directives must be ordered in such a way that this always comes first,
48-
// otherwise the log level will be incorrectly set
49-
#ifndef DEBUG_LEVEL
50-
#define DEBUG_LEVEL DEBUG_LEVEL_INFO
51-
#endif // DEBUG_LEVEL
52-
#include <Arduino_DebugUtils.h>
55+
56+
5357

5458
/******************************************************************************
5559
* AUTOMATICALLY CONFIGURED DEFINES

0 commit comments

Comments
 (0)