Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
CaptureLogOutput Class Reference

#include <log_internal.h>

+ Inheritance diagram for CaptureLogOutput:
+ Collaboration diagram for CaptureLogOutput:

Public Member Functions

 CaptureLogOutput ()=delete
 
 DISABLE_CLASS_COPY (CaptureLogOutput)
 
 CaptureLogOutput (Logger &logger)
 
 ~CaptureLogOutput ()
 
void setLogLevel (LogLevel level)
 
void logRaw (LogLevel lev, std::string_view line) override
 
void log (LogLevel lev, const std::string &combined, const std::string &time, const std::string &thread_name, std::string_view payload_text) override
 
std::vector< LogEntrytake ()
 

Private Attributes

Loggerm_logger
 
std::mutex m_mutex
 
std::vector< LogEntrym_entries
 

Constructor & Destructor Documentation

◆ CaptureLogOutput() [1/2]

CaptureLogOutput::CaptureLogOutput ( )
delete

◆ CaptureLogOutput() [2/2]

CaptureLogOutput::CaptureLogOutput ( Logger & logger)
inline

References Logger::addOutput(), and m_logger.

+ Here is the call graph for this function:

◆ ~CaptureLogOutput()

CaptureLogOutput::~CaptureLogOutput ( )
inline

References m_logger, and Logger::removeOutput().

+ Here is the call graph for this function:

Member Function Documentation

◆ DISABLE_CLASS_COPY()

CaptureLogOutput::DISABLE_CLASS_COPY ( CaptureLogOutput )

◆ log()

void CaptureLogOutput::log ( LogLevel lev,
const std::string & combined,
const std::string & time,
const std::string & thread_name,
std::string_view payload_text )
inlineoverridevirtual

Implements ILogOutput.

References m_entries, and m_mutex.

◆ logRaw()

void CaptureLogOutput::logRaw ( LogLevel lev,
std::string_view line )
inlineoverridevirtual

Implements ILogOutput.

References m_entries, and m_mutex.

◆ setLogLevel()

void CaptureLogOutput::setLogLevel ( LogLevel level)
inline

References Logger::addOutputMaxLevel(), m_logger, and Logger::removeOutput().

Referenced by Game::readSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ take()

std::vector< LogEntry > CaptureLogOutput::take ( )
inline

References m_entries, and m_mutex.

Referenced by TestLogging::testBitCheck(), TestLogging::testNullChecks(), and Game::updateChat().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_entries

std::vector<LogEntry> CaptureLogOutput::m_entries
private

Referenced by log(), logRaw(), and take().

◆ m_logger

Logger& CaptureLogOutput::m_logger
private

◆ m_mutex

std::mutex CaptureLogOutput::m_mutex
private

Referenced by log(), logRaw(), and take().


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