Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
logger.hpp File Reference

Logger class with timestamp provider and output sink. More...

Detailed Description

Logger class with timestamp provider and output sink.

Output format: I 12345 main.cpp:42| Message

The Logger class is templated on:

  • Output: Sink type with static write(const char*) method
  • TimestampProvider: Type with static uint32_t now() method

Use the macros in macros.hpp for automatic file/line capture.

Definition in file logger.hpp.

#include <cstdint>
#include <cstddef>
#include <sbl/common/log/format.hpp>
#include <sbl/common/log/sink.hpp>

Go to the source code of this file.

Classes

class  sbl::log::Logger< Output, TimestampProvider, MinLevel >
 Logger class with compile-time level filtering. More...
 

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::log
 Logging.
 

Enumerations

enum class  sbl::log::Level : uint8_t {
  Off = 0 , Error = 1 , Warn = 2 , Info = 3 ,
  Debug = 4 , Trace = 5
}
 Log severity levels. More...
 

Functions

constexpr char sbl::log::level_char (Level level)
 Convert level to single character.
 
constexpr const char * sbl::log::basename (const char *path)
 Extract filename from path (compile-time safe)