mirror of https://github.com/gabime/spdlog.git
Add support of std::stream for logger
Logger can be used as a std::ostream. // Console logger with color auto console = spd::stdout_color_mt("console"); console->info() << "Welcome to spdlog!"; console->error() << "Some error message with arg" << 1 << "..";pull/363/head
parent
35865ee54e
commit
b50d520999
@ -0,0 +1,29 @@
|
||||
//
|
||||
// Copyright(c) 2017 Benoit Leforestier.
|
||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
template <class CharT, class Traits>
|
||||
spdlog::basic_streambuf<CharT, Traits>::basic_streambuf(spdlog::logger* plogger, spdlog::level::level_enum lvl) :
|
||||
{
|
||||
}
|
||||
|
||||
template <class CharT, class Traits>
|
||||
spdlog::basic_streambuf<CharT, Traits>::basic_streambuf(basic_streambuf&& rhs) :
|
||||
{
|
||||
}
|
||||
|
||||
template <class CharT, class Traits>
|
||||
spdlog::basic_streambuf<CharT, Traits>::~basic_streambuf()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
template <class CharT, class Traits>
|
||||
std::streamsize spdlog::basic_streambuf<CharT, Traits>::xsputn(const char_type* __s, std::streamsize __n)
|
||||
{
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
//
|
||||
// Copyright(c) 2017 Benoit Leforestier.
|
||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace spdlog
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue