spdlog/include/c11log/sinks/stdout_sinks.h

33 lines
641 B
C
Raw Normal View History

2014-10-09 19:44:12 -04:00
#pragma once
#include <iostream>
#include <mutex>
#include "ostream_sink.h"
#include "../details/null_mutex.h"
namespace c11log
{
namespace sinks
{
template <class Mutex>
class stdout_sink : public ostream_sink<Mutex>
{
public:
stdout_sink() : ostream_sink<Mutex>(std::cout) {}
};
typedef stdout_sink<std::mutex> stdout_sink_mt;
typedef stdout_sink<details::null_mutex> stdout_sink_st;
template <class Mutex>
class stderr_sink : public ostream_sink<Mutex>
{
public:
stderr_sink() : ostream_sink<Mutex>(std::cerr) {}
};
typedef stderr_sink<std::mutex> stderr_sink_mt;
typedef stderr_sink<details::null_mutex> stderr_sink_st;
}
}