RF24Log  0.1.3
Unified logging library
RF24LogBaseHandler.h
Go to the documentation of this file.
1 
16 #ifndef SRC_RF24LOGBASEHANDLER_H_
17 #define SRC_RF24LOGBASEHANDLER_H_
18 
19 #if defined(ARDUINO_ARCH_AVR)
20 #include <WString.h> // __FlashStringHelper
21 #else
22 #include <string.h>
23 #endif
24 #include <stdint.h>
25 #include <stdarg.h>
26 
28 #if !defined(RF24LOG_DELIMITER)
29 #define RF24LOG_DELIMITER ';'
30 #endif
31 
32 // for some reason, these need to be declared here and
33 // not on any higher level of the project (see doc comments below for details)
34 // #define RF24LOG_NO_TIMESTAMP
35 // #define RF24LOG_NO_EOL
36 // #define RF24LOG_TAB_SIZE 4
37 
38 #ifdef DOXYGEN_FORCED
40 #define RF24LOG_NO_EOL
41 
43 #define RF24LOG_NO_TIMESTAMP
44 
50 #define RF24LOG_TAB_SIZE 8
51 #endif
52 
55 {
56 public:
65  virtual void log(uint8_t logLevel,
66  const char *vendorId,
67  const char *message,
68  va_list *args) = 0;
69 
70 #if defined (ARDUINO_ARCH_AVR)
71  virtual void log(uint8_t logLevel,
72  const __FlashStringHelper *vendorId,
73  const __FlashStringHelper *message,
74  va_list *args) = 0;
75 #endif
76 
83  virtual void setLogLevel(uint8_t logLevel) = 0;
84 };
85 
86 #endif /* SRC_RF24LOGBASEHANDLER_H_ */
A base mechanism for handling log messages.
virtual void setLogLevel(uint8_t logLevel)=0
virtual void log(uint8_t logLevel, const char *vendorId, const char *message, va_list *args)=0
log a message.