Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
inexor::util::InexorCutAnsiCodesSink Class Reference

Sink wrapper for removing any color codes from the log. More...

Inheritance diagram for inexor::util::InexorCutAnsiCodesSink:

Public Member Functions

 InexorCutAnsiCodesSink (spdlog::sink_ptr wrapped_sink)
 
 InexorCutAnsiCodesSink (const InexorCutAnsiCodesSink &other)=delete
 
InexorCutAnsiCodesSinkoperator= (const InexorCutAnsiCodesSink &other)=delete
 
 ~InexorCutAnsiCodesSink () override
 
void log (const spdlog::details::log_msg &msg) override
 spdlog hook we override. More...
 
void flush () override
 

Protected Member Functions

std::string cutANSICodes (std::string logline)
 cut any valid ANSI Codes (used e.g. for colors in terminals) from a string. More...
 

Protected Attributes

spdlog::sink_ptr sink_
 

Detailed Description

Sink wrapper for removing any color codes from the log.

Constructor & Destructor Documentation

inexor::util::InexorCutAnsiCodesSink::InexorCutAnsiCodesSink ( spdlog::sink_ptr  wrapped_sink)
inline
inexor::util::InexorCutAnsiCodesSink::InexorCutAnsiCodesSink ( const InexorCutAnsiCodesSink other)
delete
inexor::util::InexorCutAnsiCodesSink::~InexorCutAnsiCodesSink ( )
inlineoverride

References flush().

Member Function Documentation

std::string inexor::util::InexorCutAnsiCodesSink::cutANSICodes ( std::string  logline)
inlineprotected

cut any valid ANSI Codes (used e.g. for colors in terminals) from a string.

Referenced by log().

void inexor::util::InexorCutAnsiCodesSink::flush ( )
inlineoverride

References sink_.

Referenced by ~InexorCutAnsiCodesSink().

void inexor::util::InexorCutAnsiCodesSink::log ( const spdlog::details::log_msg &  msg)
inlineoverride

spdlog hook we override.

References cutANSICodes(), and sink_.

InexorCutAnsiCodesSink& inexor::util::InexorCutAnsiCodesSink::operator= ( const InexorCutAnsiCodesSink other)
delete

Member Data Documentation

spdlog::sink_ptr inexor::util::InexorCutAnsiCodesSink::sink_
protected

Referenced by flush(), and log().


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