microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
microfmt::log::log_meta Struct Reference

Execution-context metadata attached to an extended_log_msg. More...

#include <extended_msg.hpp>

Public Member Functions

constexpr bool has (log_flag f) const noexcept
 
constexpr bool can_wait () const noexcept
 
constexpr std::uint32_t user_flags () const noexcept
 Returns the user-defined flag bits, shifted down to bit 0.
 
constexpr void set_user_flags (std::uint32_t user) noexcept
 Replaces the 16 user-defined flag bits.
 
constexpr void set (log_flag f, bool on=true) noexcept
 

Public Attributes

std::uint32_t pid {0}
 
std::uint32_t tid {0}
 
std::uint32_t cpu {no_cpu}
 
std::uint32_t flags {0}
 

Static Public Attributes

static constexpr unsigned user_flags_shift = 16
 Bit position of the first user-defined flag in flags.
 

Detailed Description

Execution-context metadata attached to an extended_log_msg.

Member Function Documentation

◆ can_wait()

constexpr bool microfmt::log::log_meta::can_wait ( ) const
inlineconstexprnoexcept

◆ has()

constexpr bool microfmt::log::log_meta::has ( log_flag  f) const
inlineconstexprnoexcept

◆ set()

constexpr void microfmt::log::log_meta::set ( log_flag  f,
bool  on = true 
)
inlineconstexprnoexcept

◆ set_user_flags()

constexpr void microfmt::log::log_meta::set_user_flags ( std::uint32_t  user)
inlineconstexprnoexcept

Replaces the 16 user-defined flag bits.

◆ user_flags()

constexpr std::uint32_t microfmt::log::log_meta::user_flags ( ) const
inlineconstexprnoexcept

Returns the user-defined flag bits, shifted down to bit 0.

Member Data Documentation

◆ cpu

std::uint32_t microfmt::log::log_meta::cpu {no_cpu}

◆ flags

std::uint32_t microfmt::log::log_meta::flags {0}

◆ pid

std::uint32_t microfmt::log::log_meta::pid {0}

◆ tid

std::uint32_t microfmt::log::log_meta::tid {0}

◆ user_flags_shift

constexpr unsigned microfmt::log::log_meta::user_flags_shift = 16
staticconstexpr

Bit position of the first user-defined flag in flags.


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