4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::log::context Class Reference

Detailed Description

A logger context manages log levels.

Public Member Functions

 FCPPT_NONMOVABLE (context)
 
FCPPT_LOG_DETAIL_SYMBOL context (fcppt::log::optional_level const &root, fcppt::log::level_stream_array &&streams)
 Constructs a context.
 
FCPPT_LOG_DETAIL_SYMBOL ~context ()
 
FCPPT_LOG_DETAIL_SYMBOL void set (fcppt::log::location const &, fcppt::log::optional_level const &)
 Updates the log level at a location.
 
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::optional_level get (fcppt::log::location const &) const
 Gets the current log level for a location.
 
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::const_level_stream_array_reference level_streams () const
 The level streams of this context.
 

Friends

class fcppt::log::object
 

Constructor & Destructor Documentation

◆ context()

FCPPT_LOG_DETAIL_SYMBOL fcppt::log::context::context ( fcppt::log::optional_level const & root,
fcppt::log::level_stream_array && streams )

Constructs a context.

Parameters
rootThe root log level which will be the default for new log locations
streamsThe stream sinks to use for all log locations

◆ ~context()

FCPPT_LOG_DETAIL_SYMBOL fcppt::log::context::~context ( )

Member Function Documentation

◆ FCPPT_NONMOVABLE()

fcppt::log::context::FCPPT_NONMOVABLE ( context )

◆ get()

FCPPT_LOG_DETAIL_SYMBOL fcppt::log::optional_level fcppt::log::context::get ( fcppt::log::location const & ) const
nodiscard

Gets the current log level for a location.

◆ level_streams()

FCPPT_LOG_DETAIL_SYMBOL fcppt::log::const_level_stream_array_reference fcppt::log::context::level_streams ( ) const
nodiscard

The level streams of this context.

◆ set()

FCPPT_LOG_DETAIL_SYMBOL void fcppt::log::context::set ( fcppt::log::location const & ,
fcppt::log::optional_level const &  )

Updates the log level at a location.

Note that every location below is also updated.

Friends And Related Symbol Documentation

◆ fcppt::log::object

friend class fcppt::log::object
friend