30 lines
688 B
C++
30 lines
688 B
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <array>
|
|
#include <limits>
|
|
#include <string>
|
|
|
|
namespace bts {
|
|
namespace log {
|
|
|
|
struct Level {
|
|
using Rep = uint8_t;
|
|
constexpr static auto Max = std::numeric_limits<Rep>::max();
|
|
Rep ordinal;
|
|
bool operator<(const Level &rhs) const {return ordinal < rhs.ordinal;}
|
|
};
|
|
|
|
struct Subsystem {
|
|
using Rep = uint8_t;
|
|
constexpr static auto Max = std::numeric_limits<Rep>::max();
|
|
Rep ordinal;
|
|
bool operator<(const Subsystem &rhs) const {return ordinal < rhs.ordinal;}
|
|
};
|
|
|
|
using ArgBuffer = std::array<uint8_t,36>;
|
|
using MsgFormatter = std::string(*) (ArgBuffer const&,const char*);
|
|
using Filter = std::array<Level,Subsystem::Max+1>;
|
|
|
|
}}
|