Turi Create  4.0
log_level_setter Class Reference

#include <core/logging/log_level_setter.hpp>

Public Member Functions

 log_level_setter (int loglevel)
 
 ~log_level_setter ()
 

Detailed Description

Class for setting global log level, unsets log level on destruction.

Create a log_level_setter object to change the loglevel as desired. Upon destruction of the object, the loglevel will be reset to the previous logging level.

auto e = log_level_setter(LOG_NONE); // quiets the logging that follows

Definition at line 25 of file log_level_setter.hpp.

Constructor & Destructor Documentation

◆ log_level_setter()

log_level_setter::log_level_setter ( int  loglevel)

Set global log level to the provided log level.

Parameters
logleveldesired loglevel. See logger.hpp:97 for a description of each level.

◆ ~log_level_setter()

log_level_setter::~log_level_setter ( )

Destructor resets global log level to the previous level.


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