2.10.0
Freundlich's C++ toolkit
Public Member Functions | Friends
fcppt::log::context Class Reference

Detailed Description

A logger context manages log levels.

Public Member Functions

FCPPT_LOG_DETAIL_SYMBOL context (fcppt::log::optional_level const &root, fcppt::log::level_stream_array const &streams)
 Constructs a context. More...
 
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. More...
 
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::optional_level get (fcppt::log::location const &) const
 Gets the current log level for a location. More...
 
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::const_level_stream_array_ref level_streams () const
 The level streams of this context. More...
 

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 const &  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

◆ get()

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

Gets the current log level for a location.

◆ level_streams()

FCPPT_LOG_DETAIL_SYMBOL fcppt::log::const_level_stream_array_ref fcppt::log::context::level_streams ( ) const

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 Function Documentation

◆ fcppt::log::object

friend class fcppt::log::object
friend