dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::log Struct Reference

the whole log setting in two 32 bit words: the level - a dx::log::level per dx::log::scope per dx::log::module, four bits each - and the pipes (dx::log::pipe), where the lines go. The words are what a driver, a kernel, a host and a firmware exchange and compare; the named members are the same bits, and to/from name them for a preference, a command line or a property. The serialization macro hands the member list to the tree sink of dx_serialize.h, so a store - the plugin property's dictionary as a cf::store among them - holds the log resolved rather than the words. More...

#include <dx_log.h>

Collaboration diagram for dx::log:

Classes

union  [union].__unnamed0__
struct  circular
 the log's lines from any number of writers, lock free: a writer reserves its entry at tx - a length word and the line, padded to the word - and writes the length word last; the one reader takes the entries whose length word stands and clears them behind it, so a zero length is a line not written yet The ring's size is a multiple of the word, so a length word never wraps. More...
struct  from
struct  module
 the parts of a driver a message is attributed to, each with its own dx::log::scope More...
union  pipe
 where the std streams' lines go: the dx::log::pipe::sinks of each - a stream naming no sink of the process drops its lines More...
struct  scope
 the phases a module is logged apart in - a device's setup may be traced while its operation stays quiet More...
struct  to

Public Types

enum class  level : uint8_t {
  none , error , warning , info ,
  debug , levels , last = debug , invalid = levels ,
  dflt = error
}
 rising verbosity: a message is logged where its level is at most the scope's More...

Public Member Functions

 operator uint32_t() const
bool operator ==(const log& log) const
scope& operator [](const char* name)
scope& operator [](module::idx idx)
 the module's scopes; an unknown module answers with a shared invalid scope, which logs nothing and takes no setting

Public Attributes

union  
union dx::log::pipe pipes

Static Public Attributes

static auto constexpr id= "dx:log"
static constexpr const char* name [] {"none", "error", "warning", "info", "debug"}
static auto constexpr path= "dx:log:path"

Detailed Description

the whole log setting in two 32 bit words: the level - a dx::log::level per dx::log::scope per dx::log::module, four bits each - and the pipes (dx::log::pipe), where the lines go. The words are what a driver, a kernel, a host and a firmware exchange and compare; the named members are the same bits, and to/from name them for a preference, a command line or a property. The serialization macro hands the member list to the tree sink of dx_serialize.h, so a store - the plugin property's dictionary as a cf::store among them - holds the log resolved rather than the words.

Member Enumeration Documentation

◆ level

enum class dx::log::level : uint8_t
strong

rising verbosity: a message is logged where its level is at most the scope's

Enumerator
none 
error 
warning 
info 
debug 
levels 
last 
invalid 
dflt 

Member Function Documentation

◆ operator uint32_t()

dx::log::operator uint32_t() const
inline

◆ operator ==()

bool dx::log::operator ==(const log& log) const
inline

◆ operator []() [1/2]

scope& dx::log::operator [](const char* name)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator []() [2/2]

scope& dx::log::operator [](module::idx idx)
inline

the module's scopes; an unknown module answers with a shared invalid scope, which logs nothing and takes no setting

Member Data Documentation

◆ @317061067206030255050245255217270014205141262245

◆ id

auto constexpr dx::log::id= "dx:log"
staticconstexpr

◆ name

const char* dx::log::name[]{"none", "error", "warning", "info", "debug"}
staticconstexpr

◆ path

auto constexpr dx::log::path= "dx:log:path"
staticconstexpr

◆ pipes

union dx::log::pipe dx::log::pipes

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