mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +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()
|
||||
{
|
||||
return stdout;
|
||||
return stderr;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
static HANDLE handle()
|
||||
|
@ -22,13 +22,13 @@ namespace sinks {
|
||||
* of the message.
|
||||
* If no color terminal detected, omit the escape codes.
|
||||
*/
|
||||
template<class ConsoleTargetTrait, class ConsoleMutexTrait>
|
||||
template<class StreamTrait, class ConsoleMutexTrait>
|
||||
class ansicolor_sink : public sink
|
||||
{
|
||||
public:
|
||||
using mutex_t = typename ConsoleMutexTrait::mutex_t;
|
||||
ansicolor_sink()
|
||||
: target_file_(ConsoleTargetTrait::stream())
|
||||
: target_file_(StreamTrait::stream())
|
||||
, _mutex(ConsoleMutexTrait::console_mutex())
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user