mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-12 17:00:25 +08:00
Fixed console traits
This commit is contained in:
parent
e4f0d6446b
commit
b393c9d6e6
@ -25,7 +25,7 @@ struct console_stderr_trait
|
|||||||
{
|
{
|
||||||
static FILE *stream()
|
static FILE *stream()
|
||||||
{
|
{
|
||||||
return stdout;
|
return stderr;
|
||||||
}
|
}
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static HANDLE handle()
|
static HANDLE handle()
|
||||||
|
@ -22,13 +22,13 @@ namespace sinks {
|
|||||||
* of the message.
|
* of the message.
|
||||||
* If no color terminal detected, omit the escape codes.
|
* If no color terminal detected, omit the escape codes.
|
||||||
*/
|
*/
|
||||||
template<class ConsoleTargetTrait, class ConsoleMutexTrait>
|
template<class StreamTrait, class ConsoleMutexTrait>
|
||||||
class ansicolor_sink : public sink
|
class ansicolor_sink : public sink
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using mutex_t = typename ConsoleMutexTrait::mutex_t;
|
using mutex_t = typename ConsoleMutexTrait::mutex_t;
|
||||||
ansicolor_sink()
|
ansicolor_sink()
|
||||||
: target_file_(ConsoleTargetTrait::stream())
|
: target_file_(StreamTrait::stream())
|
||||||
, _mutex(ConsoleMutexTrait::console_mutex())
|
, _mutex(ConsoleMutexTrait::console_mutex())
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user