Minetest 5.10.0-dev
 
Loading...
Searching...
No Matches
LogOutputBuffer Class Reference

#include <log.h>

+ Inheritance diagram for LogOutputBuffer:
+ Collaboration diagram for LogOutputBuffer:

Public Member Functions

 LogOutputBuffer (Logger &logger)
 
virtual ~LogOutputBuffer ()
 
void updateLogLevel ()
 
void logRaw (LogLevel lev, std::string_view line)
 
void clear ()
 
bool empty () const
 
std::string get ()
 
- Public Member Functions inherited from ICombinedLogOutput
void log (LogLevel lev, const std::string &combined, const std::string &time, const std::string &thread_name, std::string_view payload_text)
 

Private Attributes

std::mutex m_buffer_mutex
 
std::queue< std::string > m_buffer
 
Loggerm_logger
 

Constructor & Destructor Documentation

◆ LogOutputBuffer()

LogOutputBuffer::LogOutputBuffer ( Logger & logger)
inline

References updateLogLevel().

+ Here is the call graph for this function:

◆ ~LogOutputBuffer()

virtual LogOutputBuffer::~LogOutputBuffer ( )
inlinevirtual

References m_logger, and Logger::removeOutput().

+ Here is the call graph for this function:

Member Function Documentation

◆ clear()

void LogOutputBuffer::clear ( )
inline

References m_buffer, and m_buffer_mutex.

Referenced by Game::shutdown().

+ Here is the caller graph for this function:

◆ empty()

bool LogOutputBuffer::empty ( ) const
inline

References m_buffer, and m_buffer_mutex.

Referenced by Game::updateChat().

+ Here is the caller graph for this function:

◆ get()

std::string LogOutputBuffer::get ( )
inline

References m_buffer, and m_buffer_mutex.

Referenced by Game::updateChat().

+ Here is the caller graph for this function:

◆ logRaw()

void LogOutputBuffer::logRaw ( LogLevel lev,
std::string_view line )
virtual

Implements ILogOutput.

References g_settings, Settings::getBool(), LL_ERROR, LL_INFO, LL_TRACE, LL_VERBOSE, LL_WARNING, m_buffer, and m_buffer_mutex.

+ Here is the call graph for this function:

◆ updateLogLevel()

void LogOutputBuffer::updateLogLevel ( )

References Logger::addOutputMaxLevel(), g_settings, Settings::get(), LL_MAX, LL_NONE, m_logger, Logger::removeOutput(), Logger::stringToLevel(), and warningstream.

Referenced by LogOutputBuffer().

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

Member Data Documentation

◆ m_buffer

std::queue<std::string> LogOutputBuffer::m_buffer
private

Referenced by clear(), empty(), get(), and logRaw().

◆ m_buffer_mutex

std::mutex LogOutputBuffer::m_buffer_mutex
mutableprivate

Referenced by clear(), empty(), get(), and logRaw().

◆ m_logger

Logger& LogOutputBuffer::m_logger
private

Referenced by ~LogOutputBuffer(), and updateLogLevel().


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