Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::logging::sinks::ConsoleLogSink Class Reference

Standard console output log sink with optional ANSI color codes. More...

#include <ConsoleLogSink.hpp>

+ Collaboration diagram for corium::logging::sinks::ConsoleLogSink:

Public Member Functions

bool colorsEnabled () const noexcept
 
 ConsoleLogSink (bool useColors=true) noexcept
 
void setColorsEnabled (bool enable) noexcept
 Enable or disable ANSI color formatting.
 
template<std::size_t N>
void write (const LogEventT< N > &event) const
 Write log event to std::cout or std::cerr.
 

Detailed Description

Standard console output log sink with optional ANSI color codes.

Constructor & Destructor Documentation

◆ ConsoleLogSink()

corium::logging::sinks::ConsoleLogSink::ConsoleLogSink ( bool  useColors = true)
inlineexplicitnoexcept

Member Function Documentation

◆ colorsEnabled()

bool corium::logging::sinks::ConsoleLogSink::colorsEnabled ( ) const
inlinenoexcept

◆ setColorsEnabled()

void corium::logging::sinks::ConsoleLogSink::setColorsEnabled ( bool  enable)
inlinenoexcept

Enable or disable ANSI color formatting.

◆ write()

template<std::size_t N>
void corium::logging::sinks::ConsoleLogSink::write ( const LogEventT< N > &  event) const
inline

Write log event to std::cout or std::cerr.

+ Here is the call graph for this function:

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