Simple-Log  alpha-v0.7
sl::log::SetSev< TSeverityLevel > Class Template Reference

Manipulates the channel of the current RecordBuilder object. More...

#include <RecordBuilder.hpp>

Public Types

using Sev_t = TSeverityLevel
 

Public Member Functions

constexpr SetSev (TSeverityLevel data) noexcept(std::is_nothrow_move_constructible_v< Sev_t >)
 Constructor accepting severity level data. More...
 
template<Record TRecord>
void operator() (TRecord &rec) const
 Changes severity level of the passed Record object. More...
 

Detailed Description

template<class TSeverityLevel>
class sl::log::SetSev< TSeverityLevel >

Manipulates the channel of the current RecordBuilder object.

Template Parameters
TSeverityLevelSeverity level type which must later on be convertible to Record's severity level type.

This type is generally designed to be directly used in logging expressions. When handed-over to a RecordBuilder instance by operator <<, it will then manipulate the severity level data of its constructing Record object.

Examples
ColorizedConsoleLogging/main.cpp, EasyStart/main.cpp, and FileLogging/main.cpp.

Member Typedef Documentation

◆ Sev_t

template<class TSeverityLevel >
using sl::log::SetSev< TSeverityLevel >::Sev_t = TSeverityLevel

Constructor & Destructor Documentation

◆ SetSev()

template<class TSeverityLevel >
constexpr sl::log::SetSev< TSeverityLevel >::SetSev ( TSeverityLevel  data)
inlineexplicitconstexprnoexcept

Constructor accepting severity level data.

Parameters
dataSeverity level data.

Member Function Documentation

◆ operator()()

template<class TSeverityLevel >
template<Record TRecord>
void sl::log::SetSev< TSeverityLevel >::operator() ( TRecord &  rec) const
inline

Changes severity level of the passed Record object.

Template Parameters
TRecordUsed Record type.
Parameters
recThe Record which is about to change

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