Simple-Log  alpha-v0.7
ConsoleSink.hpp File Reference
#include "OStreamSink.hpp"
#include "Record.hpp"
#include "third_party/rang/rang.hpp"
#include <cassert>
#include <functional>
#include <iostream>
#include <mutex>
#include <unordered_map>

Go to the source code of this file.

Classes

struct  sl::log::ConsoleTextStyle
 Collection of possible style and color options for text printed onto the console. More...
 
class  sl::log::ConsoleTextStyleTable< TProjection, TTable >
 Convenience class for setting up style policies for a given Record member. More...
 
class  sl::log::ConsoleSink< TRecord >
 Sink class for directly logging onto std::cout. More...
 

Namespaces

 sl
 
 sl::log
 

Macros

#define NOMINMAX
 

Functions

std::ostream & sl::log::operator<< (std::ostream &out, const ConsoleTextStyle &style)
 Operator << overload for ConsoleTextStyle type. More...
 
template<Record TRecord, std::invocable< const TRecord & > TProjection, class TTable = std::unordered_map< std::remove_cvref_t<std::invoke_result_t<TProjection, const TRecord&>>, ConsoleTextStyle >>
auto sl::log::makeConsoleTextStyleTableFor (TProjection projection, TTable table)
 The factory function for creating ConsoleTextStyleTable instances. More...
 

Variables

template<class T , class TRecord >
concept sl::log::ConsoleTextStylePolicyFor
 Concept which checks for validity of given text style policy. More...
 
constexpr ConsoleTextStyle sl::log::defaultConsoleTextStyle
 A constant object used for resetting the style back to default. More...
 

Macro Definition Documentation

◆ NOMINMAX

#define NOMINMAX