#include <wincolor_sink.h>
Public Member Functions | |
wincolor_sink () | |
~wincolor_sink () override | |
wincolor_sink (const wincolor_sink &other)=delete | |
wincolor_sink & | operator= (const wincolor_sink &other)=delete |
void | set_color (level::level_enum level, WORD color) |
void | log (const details::log_msg &msg) final override |
void | flush () final override |
void | set_pattern (const std::string &pattern) override final |
void | set_formatter (std::unique_ptr< spdlog::formatter > sink_formatter) override final |
Public Member Functions inherited from spdlog::sinks::sink | |
sink () | |
sink (std::unique_ptr< spdlog::pattern_formatter > formatter) | |
virtual | ~sink ()=default |
bool | should_log (level::level_enum msg_level) const |
void | set_level (level::level_enum log_level) |
level::level_enum | level () const |
Public Attributes | |
const WORD | BOLD = FOREGROUND_INTENSITY |
const WORD | RED = FOREGROUND_RED |
const WORD | GREEN = FOREGROUND_GREEN |
const WORD | CYAN = FOREGROUND_GREEN | FOREGROUND_BLUE |
const WORD | WHITE = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE |
const WORD | YELLOW = FOREGROUND_RED | FOREGROUND_GREEN |
Private Types | |
using | mutex_t = typename ConsoleMutex::mutex_t |
Private Member Functions | |
WORD | set_console_attribs (WORD attribs) |
void | print_range_ (const fmt::memory_buffer &formatted, size_t start, size_t end) |
Private Attributes | |
HANDLE | out_handle_ |
mutex_t & | mutex_ |
std::unordered_map< level::level_enum, WORD, level::level_hasher > | colors_ |
Additional Inherited Members | |
Protected Attributes inherited from spdlog::sinks::sink | |
level_t | level_ |
std::unique_ptr< spdlog::formatter > | formatter_ |
Definition at line 30 of file wincolor_sink.h.
|
private |
Definition at line 110 of file wincolor_sink.h.
|
inline |
Definition at line 40 of file wincolor_sink.h.
|
inlineoverride |
Definition at line 53 of file wincolor_sink.h.
|
delete |
|
inlinefinaloverridevirtual |
Implements spdlog::sinks::sink.
Definition at line 92 of file wincolor_sink.h.
|
inlinefinaloverridevirtual |
Implements spdlog::sinks::sink.
Definition at line 68 of file wincolor_sink.h.
|
delete |
|
inlineprivate |
Definition at line 125 of file wincolor_sink.h.
|
inline |
Definition at line 62 of file wincolor_sink.h.
|
inlineprivate |
Definition at line 112 of file wincolor_sink.h.
|
inlinefinaloverridevirtual |
|
inlinefinaloverridevirtual |
const WORD spdlog::sinks::wincolor_sink< OutHandle, ConsoleMutex >::BOLD = FOREGROUND_INTENSITY |
Definition at line 33 of file wincolor_sink.h.
|
private |
Definition at line 133 of file wincolor_sink.h.
const WORD spdlog::sinks::wincolor_sink< OutHandle, ConsoleMutex >::CYAN = FOREGROUND_GREEN | FOREGROUND_BLUE |
Definition at line 36 of file wincolor_sink.h.
const WORD spdlog::sinks::wincolor_sink< OutHandle, ConsoleMutex >::GREEN = FOREGROUND_GREEN |
Definition at line 35 of file wincolor_sink.h.
|
private |
Definition at line 132 of file wincolor_sink.h.
|
private |
Definition at line 131 of file wincolor_sink.h.
const WORD spdlog::sinks::wincolor_sink< OutHandle, ConsoleMutex >::RED = FOREGROUND_RED |
Definition at line 34 of file wincolor_sink.h.
const WORD spdlog::sinks::wincolor_sink< OutHandle, ConsoleMutex >::WHITE = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE |
Definition at line 37 of file wincolor_sink.h.
const WORD spdlog::sinks::wincolor_sink< OutHandle, ConsoleMutex >::YELLOW = FOREGROUND_RED | FOREGROUND_GREEN |
Definition at line 38 of file wincolor_sink.h.