Skip to content

Commit a0271a7

Browse files
soudrugvlastahajek
authored andcommitted
chore: global debug enabling
1 parent 780bae1 commit a0271a7

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,10 @@ boolean success = influx.write();
676676
## Troubleshooting
677677
All db methods return status. Value `false` means something went wrong. Call `getLastErrorMessage()` to get the error message.
678678

679-
When error message doesn't help to explain the bad behavior, go to the library sources and in the file `src/InfluxDBClient.cpp` uncomment line 32:
679+
When error message doesn't help to explain the bad behavior, go to the library sources and in the file `src/util/debug.h` uncomment line 33:
680680
```cpp
681681
// Uncomment bellow in case of a problem and rebuild sketch
682-
#define INFLUXDB_CLIENT_DEBUG
682+
#define INFLUXDB_CLIENT_DEBUG_ENABLE
683683
```
684684
Then upload your sketch again and see the debug output in the Serial Monitor.
685685

src/BucketsClient.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "BucketsClient.h"
2828
#include "util/helpers.h"
2929

30-
//#define INFLUXDB_CLIENT_DEBUG_ENABLE
3130
#include "util/debug.h"
3231

3332
static const char *propTemplate PROGMEM = "\"%s\":";

src/HTTPService.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
#include "Platform.h"
44
#include "Version.h"
55

6-
// Uncomment bellow in case of a problem and rebuild sketch
7-
//#define INFLUXDB_CLIENT_DEBUG_ENABLE
86
#include "util/debug.h"
97

108
static const char UserAgent[] PROGMEM = "influxdb-client-arduino/" INFLUXDB_CLIENT_VERSION " (" INFLUXDB_CLIENT_PLATFORM " " INFLUXDB_CLIENT_PLATFORM_VERSION ")";

src/InfluxDbClient.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
#include "Platform.h"
2929
#include "Version.h"
3030

31-
// Uncomment bellow in case of a problem and rebuild sketch
32-
//#define INFLUXDB_CLIENT_DEBUG_ENABLE
3331
#include "util/debug.h"
3432

3533
static const char TooEarlyMessage[] PROGMEM = "Cannot send request yet because of applied retry strategy. Remaining ";

src/util/debug.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929

3030
#include <Arduino.h>
3131

32+
// Uncomment bellow in case of a problem and rebuild sketch
33+
//#define INFLUXDB_CLIENT_DEBUG_ENABLE
34+
3235
#ifdef INFLUXDB_CLIENT_DEBUG_ENABLE
3336
# define INFLUXDB_CLIENT_DEBUG(fmt, ...) Serial.printf("%.03f ",millis()/1000.0f);Serial.printf_P( (PGM_P)PSTR(fmt), ## __VA_ARGS__ )
3437
#else

0 commit comments

Comments
 (0)