Fray Engine
Loading...
Searching...
No Matches
fray::log::SinkSuppression Class Reference

Keeps the calling thread's printed lines out of the sink while it lives, then restores the previous setting. Used for lines that are recorded elsewhere under their own identity. Construct and destroy on the same thread. More...

#include <log_manager.hpp>

Public Member Functions

 SinkSuppression ()
 Suppresses the sink on the calling thread.
 SinkSuppression (const SinkSuppression &)=delete
 Disallow copying a suppression scope.
SinkSuppression & operator= (const SinkSuppression &)=delete
 Disallow copy assignment of a suppression scope.
 ~SinkSuppression ()
 Restores the previous setting on the calling thread.

Private Attributes

bool _previous
 Setting to restore when this scope ends.

Detailed Description

Keeps the calling thread's printed lines out of the sink while it lives, then restores the previous setting. Used for lines that are recorded elsewhere under their own identity. Construct and destroy on the same thread.

Definition at line 344 of file log_manager.hpp.

Constructor & Destructor Documentation

◆ SinkSuppression() [1/2]

fray::log::SinkSuppression::SinkSuppression ( )
inline

Suppresses the sink on the calling thread.

Definition at line 352 of file log_manager.hpp.

◆ SinkSuppression() [2/2]

fray::log::SinkSuppression::SinkSuppression ( const SinkSuppression & )
delete

Disallow copying a suppression scope.

◆ ~SinkSuppression()

fray::log::SinkSuppression::~SinkSuppression ( )
inline

Restores the previous setting on the calling thread.

Definition at line 364 of file log_manager.hpp.

Member Function Documentation

◆ operator=()

SinkSuppression & fray::log::SinkSuppression::operator= ( const SinkSuppression & )
delete

Disallow copy assignment of a suppression scope.

Member Data Documentation

◆ _previous

bool fray::log::SinkSuppression::_previous
private

Setting to restore when this scope ends.

Definition at line 348 of file log_manager.hpp.


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