Arduino PulseWire Transceiver Library
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions
pulsewire::Logger Class Reference

Simple logger class for debugging and logging messages. More...

#include <Logger.h>

Public Types

enum  LogLevel {
  LOG_LEVEL_NONE , LOG_LEVEL_ERROR , LOG_LEVEL_WARNING , LOG_LEVEL_INFO ,
  LOG_LEVEL_DEBUG
}
 

Static Public Member Functions

static void setLogLevel (LogLevel level)
 Set the global log level.
 
static void error (const char *format,...)
 Log an error message with formatting.
 
static void warning (const char *format,...)
 Log a warning message with formatting.
 
static void info (const char *format,...)
 Log an informational message with formatting.
 
static void debug (const char *format,...)
 Log a debug message with formatting.
 
static void setOutput (Print &print)
 Set the Output object

 

Detailed Description

Simple logger class for debugging and logging messages.

This class provides a lightweight logging utility for printing messages to the serial console. It supports different log levels and can be enabled or disabled globally. It also supports formatted messages using variadic arguments, similar to printf.

Definition at line 16 of file Logger.h.

Member Enumeration Documentation

◆ LogLevel

enum pulsewire::Logger::LogLevel

Definition at line 18 of file Logger.h.

Member Function Documentation

◆ debug()

static void pulsewire::Logger::debug ( const char format,
  ... 
)
inlinestatic

Log a debug message with formatting.

Parameters
formatThe format string (printf-style).
...Variadic arguments for the format string.

Definition at line 82 of file Logger.h.

◆ error()

static void pulsewire::Logger::error ( const char format,
  ... 
)
inlinestatic

Log an error message with formatting.

Parameters
formatThe format string (printf-style).
...Variadic arguments for the format string.

Definition at line 37 of file Logger.h.

◆ info()

static void pulsewire::Logger::info ( const char format,
  ... 
)
inlinestatic

Log an informational message with formatting.

Parameters
formatThe format string (printf-style).
...Variadic arguments for the format string.

Definition at line 67 of file Logger.h.

◆ setLogLevel()

static void pulsewire::Logger::setLogLevel ( LogLevel  level)
inlinestatic

Set the global log level.

Parameters
levelThe log level to set.

Definition at line 30 of file Logger.h.

◆ setOutput()

static void pulsewire::Logger::setOutput ( Print print)
inlinestatic

Set the Output object

Parameters
print

Definition at line 97 of file Logger.h.

◆ warning()

static void pulsewire::Logger::warning ( const char format,
  ... 
)
inlinestatic

Log a warning message with formatting.

Parameters
formatThe format string (printf-style).
...Variadic arguments for the format string.

Definition at line 52 of file Logger.h.


The documentation for this class was generated from the following file: