Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ersa::services::LoggingService Class Referenceabstract

#include <logging_service.h>

Inheritance diagram for ersa::services::LoggingService:
Inheritance graph
[legend]

Public Member Functions

virtual ~LoggingService ()=default
 
virtual void log (LogLevel level, const char *tag, const char *format,...) __attribute__((format(printf
 
virtual void virtual void logv (LogLevel level, const char *tag, const char *format, va_list args)=0
 
virtual void setLevel (LogLevel level)
 
virtual LogLevel getLevel () const
 Return the current minimum severity.
 

Static Public Member Functions

static LoggingService & instance ()
 
static void setInstance (LoggingService *instance)
 

Protected Attributes

LogLevel minLevel_ {LogLevel::Info}
 

Detailed Description

Severity-filtered logging contract for firmware and host implementations.

The interface gives services one printf-style diagnostic sink on hardware and in tests. Backends decide where messages go (serial, ring buffer, or host output), while the severity threshold avoids constructing/forwarding routine messages when a deployment wants quieter logs.

Constructor & Destructor Documentation

◆ ~LoggingService()

virtual ersa::services::LoggingService::~LoggingService ( )
virtualdefault

Member Function Documentation

◆ getLevel()

virtual LogLevel ersa::services::LoggingService::getLevel ( ) const
inlinevirtual

Return the current minimum severity.

◆ instance()

LoggingService & ersa::services::LoggingService::instance ( )
static

Return the logger installed during system composition.

◆ log()

virtual void ersa::services::LoggingService::log ( LogLevel  level,
const char *  tag,
const char *  format,
  ... 
)
virtual

Format and emit a message when severity is at least the configured level. format and arguments follow printf rules; tag identifies the source subsystem and should be a stable short label.

Reimplemented in ersa::services::StandardLoggingService.

◆ logv()

virtual void virtual void ersa::services::LoggingService::logv ( LogLevel  level,
const char *  tag,
const char *  format,
va_list  args 
)
pure virtual

Same filtering/format behavior as log(), accepting a va_list for adapters.

Implemented in ersa::services::StandardLoggingService.

◆ setInstance()

void ersa::services::LoggingService::setInstance ( LoggingService *  instance)
static

Install a non-owning logger implementation before services start.

◆ setLevel()

virtual void ersa::services::LoggingService::setLevel ( LogLevel  level)
inlinevirtual

Change the backend's severity threshold; lower levels are filtered out.

Member Data Documentation

◆ minLevel_

LogLevel ersa::services::LoggingService::minLevel_ {LogLevel::Info}
protected

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