Add logging to tests

This commit is contained in:
Daniel Öster 2025-08-31 11:31:45 +03:00
parent 5d0486c87c
commit 8af86d9f29
2 changed files with 25 additions and 0 deletions

View file

@ -7,6 +7,7 @@
#include <string.h>
#include "HardwareSerial.h"
#include "Logging.h"
#include "Print.h"
#include "esp-hal-gpio.h"

24
test/emul/Logging.h Normal file
View file

@ -0,0 +1,24 @@
#ifndef LOGGING_H
#define LOGGING_H
#include <cstdarg>
#include <cstdio>
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