56 static void info(
const char* msg);
62 static void warn(
const char* msg);
68 static void error(
const char* msg);
87 static bool forEachLine(
const std::function<
void(
const char* line)>& handler);
LogLevel
Severity levels for logging.
@ LOG_ERROR
Errors (potentially requiring user action)
@ LOG_INFO
Informational messages.
@ LOG_WARN
Warnings (non-fatal)
Abstract interface for file and directory storage backends.
Basic timestamped logger with optional SD file logging.
static void getTimeString(char *buffer, size_t len)
static bool forEachLine(const std::function< void(const char *line)> &handler)
Streams each line of the log file to the provided handler.
static const char * levelToString(LogLevel level)
static void info(const char *msg)
Log an informational message.
static void error(const char *msg)
Log an error message.
static void setMinLogLevel(LogLevel level)
Set the minimum log level (filters lower levels).
static void enableFileLogging(const std::string &path)
Enable writing logs to SD card via a storage manager.
static void warn(const char *msg)
Log a warning message.
static std::string logPath
static void log(LogLevel level, const char *msg)