From 8af86d9f29b2a21d68cd25ab48b092f87f365b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C3=96ster?= Date: Sun, 31 Aug 2025 11:31:45 +0300 Subject: [PATCH] Add logging to tests --- test/emul/Arduino.h | 1 + test/emul/Logging.h | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/emul/Logging.h diff --git a/test/emul/Arduino.h b/test/emul/Arduino.h index 092d6424..5abc6edb 100644 --- a/test/emul/Arduino.h +++ b/test/emul/Arduino.h @@ -7,6 +7,7 @@ #include #include "HardwareSerial.h" +#include "Logging.h" #include "Print.h" #include "esp-hal-gpio.h" diff --git a/test/emul/Logging.h b/test/emul/Logging.h new file mode 100644 index 00000000..49388f3e --- /dev/null +++ b/test/emul/Logging.h @@ -0,0 +1,24 @@ +#ifndef LOGGING_H +#define LOGGING_H + +#include +#include + +class Logging { + public: + static void printf(const char* format, ...) { + va_list args; + va_start(args, format); + vprintf(format, args); + va_end(args); + } + + static void println(const char* message) { printf("%s\n", message); } + + static void print(const char* message) { printf("%s", message); } +}; + +// Global logging instance +extern Logging logging; + +#endif