26#if __has_include(<usbserial/usbserial.h>)
27 #define WUT_USBSERIAL_AVAILABLE 1
29 #define WUT_USBSERIAL_AVAILABLE 0
39 void write(
LogLevel level,
const char * line,
size_t len)
override;
40 const char *
name()
const override {
return "USBSerial"; }
Abstract backend a Logger fans a formatted line out to.
Log backend writing to a USB serial adapter (requires the optional usbserial module).
const char * name() const override
Short identifier for diagnostics (eg. "UDP", "File").
bool init(const LogConfig &config) override
Opens whatever handle/socket/file this backend needs, using only fields from config (nothing hardcode...
void shutdown() override
Releases whatever init() acquired.
void write(LogLevel level, const char *line, size_t len) override
Writes one already-formatted, newline-terminated line.
LogLevel
Severity of a single log call.
Full runtime configuration for the Logger.