Battery-Emulator/Software/src/devboard/utils/logging.h
mvgalen c713d0a94e
Change Serial logging to flexible logging (#690)
* Add Logging class
Add Logging class which inherits from Print class, to be able to route logging to USB Serial or to memory for display in the webpage. Adds a log webpage only visible when DEBUG_VIA_WEB is defined.
2024-12-22 22:48:35 +01:00

16 lines
338 B
C++

#ifndef __LOGGING_H__
#define __LOGGING_H__
#include <inttypes.h>
#include "Print.h"
class Logging : public Print {
public:
virtual size_t write(const uint8_t* buffer, size_t size);
virtual size_t write(uint8_t) { return 0; }
void printf(const char* fmt, ...);
Logging() {}
};
extern Logging logging;
#endif // __LOGGING_H__