iterative-solver 0.0
 
Loading...
Searching...
No Matches
molpro::linalg::itsolv::log::Record Class Reference

A single logged event, as passed to sinks. More...

#include <Logger.h>

Detailed Description

A single logged event, as passed to sinks.

Public Member Functions

const std::type_info & type () const
 
template<event_context Ctx>
bool is () const
 
template<event_context Ctx>
const Ctx::Payload * get () const
 
std::string text () const
 
bool is_data_dump () const
 

Static Public Member Functions

template<event_context Ctx>
static Record make (Severity severity, Verbosity verbosity, std::string_view message, const typename Ctx::Payload &payload)
 

Public Attributes

std::string_view context
 Name of the context.
 
Severity severity
 
Verbosity verbosity
 
std::string_view message
 The message without the payload's text representation.
 

Member Function Documentation

◆ get()

template<event_context Ctx>
const Ctx::Payload * molpro::linalg::itsolv::log::Record::get ( ) const
inline
Returns
The event's payload if the event is of context Ctx, nullptr otherwise

◆ is()

template<event_context Ctx>
bool molpro::linalg::itsolv::log::Record::is ( ) const
inline
Returns
Whether this event is of context Ctx

◆ is_data_dump()

bool molpro::linalg::itsolv::log::Record::is_data_dump ( ) const
inline
Returns
Whether this event is a data dump

◆ make()

template<event_context Ctx>
static Record molpro::linalg::itsolv::log::Record::make ( Severity  severity,
Verbosity  verbosity,
std::string_view  message,
const typename Ctx::Payload &  payload 
)
inlinestatic

◆ text()

std::string molpro::linalg::itsolv::log::Record::text ( ) const
inline
Returns
The message followed by the text representation of the payload (if its context provides one)

◆ type()

const std::type_info & molpro::linalg::itsolv::log::Record::type ( ) const
inline
Returns
the type of the event's context

Member Data Documentation

◆ context

std::string_view molpro::linalg::itsolv::log::Record::context

Name of the context.

◆ message

std::string_view molpro::linalg::itsolv::log::Record::message

The message without the payload's text representation.

◆ severity

Severity molpro::linalg::itsolv::log::Record::severity

◆ verbosity

Verbosity molpro::linalg::itsolv::log::Record::verbosity