Luanti 5.16.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

Referenced by DISABLE_CLASS_COPY().

Here is the caller graph for this function:

◆ CaptureLogOutput() [2/2]

CaptureLogOutput::CaptureLogOutput ( Logger & logger)
inline

References m_logger.

◆ ~CaptureLogOutput()

CaptureLogOutput::~CaptureLogOutput ( )
inline

References m_logger.

Member Function Documentation

◆ DISABLE_CLASS_COPY()

CaptureLogOutput::DISABLE_CLASS_COPY ( CaptureLogOutput )

References CaptureLogOutput().

Here is the call graph for this function:

◆ 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 m_logger.

◆ take()

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

References m_entries, and m_mutex.

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

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: