KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCOPED_WXLOG_TARGET Class Reference

A scoped application of a wxLog target. More...

#include <wx_log_utils.h>

Inheritance diagram for SCOPED_WXLOG_TARGET:
KI_TEST::SCOPED_COUNTING_WXLOG

Public Member Functions

 SCOPED_WXLOG_TARGET (wxLog *aTarget)
 
 ~SCOPED_WXLOG_TARGET ()
 

Private Attributes

wxLog * m_logger
 
wxLog * m_previous
 

Detailed Description

A scoped application of a wxLog target.

While this class lives, all wxLog messages are sent to the given target. When this class is destroyed, the previous target is restored.

Definition at line 33 of file wx_log_utils.h.

Constructor & Destructor Documentation

◆ SCOPED_WXLOG_TARGET()

SCOPED_WXLOG_TARGET::SCOPED_WXLOG_TARGET ( wxLog * aTarget)
inline
Parameters
aTargetthe wxLog target to use for the lifetime of this object (null is allowed, and means no logging)

Definition at line 40 of file wx_log_utils.h.

References m_logger, and m_previous.

Referenced by KI_TEST::SCOPED_COUNTING_WXLOG::SCOPED_COUNTING_WXLOG().

◆ ~SCOPED_WXLOG_TARGET()

SCOPED_WXLOG_TARGET::~SCOPED_WXLOG_TARGET ( )
inline

Definition at line 46 of file wx_log_utils.h.

References m_previous.

Member Data Documentation

◆ m_logger

wxLog* SCOPED_WXLOG_TARGET::m_logger
private

Definition at line 49 of file wx_log_utils.h.

Referenced by SCOPED_WXLOG_TARGET().

◆ m_previous

wxLog* SCOPED_WXLOG_TARGET::m_previous
private

Definition at line 50 of file wx_log_utils.h.

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


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