KiCad PCB EDA Suite
WX_LOGLEVEL_CONTEXT Class Reference

Context class to set wx loglevel for a block, and always restore it at the end. More...

Public Member Functions

 WX_LOGLEVEL_CONTEXT (wxLogLevel level)
 
 ~WX_LOGLEVEL_CONTEXT ()
 

Private Attributes

wxLogLevel m_old_level
 

Detailed Description

Context class to set wx loglevel for a block, and always restore it at the end.

Definition at line 55 of file eda_pattern_match.cpp.

Constructor & Destructor Documentation

◆ WX_LOGLEVEL_CONTEXT()

WX_LOGLEVEL_CONTEXT::WX_LOGLEVEL_CONTEXT ( wxLogLevel  level)
inline

Definition at line 60 of file eda_pattern_match.cpp.

61  {
62  m_old_level = wxLog::GetLogLevel();
63  wxLog::SetLogLevel( level );
64  }

References m_old_level.

◆ ~WX_LOGLEVEL_CONTEXT()

WX_LOGLEVEL_CONTEXT::~WX_LOGLEVEL_CONTEXT ( )
inline

Definition at line 66 of file eda_pattern_match.cpp.

67  {
68  wxLog::SetLogLevel( m_old_level );
69  }

References m_old_level.

Member Data Documentation

◆ m_old_level

wxLogLevel WX_LOGLEVEL_CONTEXT::m_old_level
private

Definition at line 57 of file eda_pattern_match.cpp.

Referenced by WX_LOGLEVEL_CONTEXT(), and ~WX_LOGLEVEL_CONTEXT().


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