mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
Fixed stdout_color_sinks.h namespace
This commit is contained in:
parent
8fdd26da82
commit
e574f57511
@ -12,8 +12,8 @@
|
|||||||
#include "spdlog/sinks/ansicolor_sink.h"
|
#include "spdlog/sinks/ansicolor_sink.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace spdlog {
|
||||||
using namespace spdlog::sinks;
|
namespace sinks {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
using stdout_color_sink_mt = wincolor_stdout_sink_mt;
|
using stdout_color_sink_mt = wincolor_stdout_sink_mt;
|
||||||
using stdout_color_sink_st = wincolor_stdout_sink_st;
|
using stdout_color_sink_st = wincolor_stdout_sink_st;
|
||||||
@ -25,29 +25,25 @@ using stdout_color_sink_st = ansicolor_stdout_sink_st;
|
|||||||
using stderr_color_sink_mt = ansicolor_stderr_sink_mt;
|
using stderr_color_sink_mt = ansicolor_stderr_sink_mt;
|
||||||
using stderr_color_sink_st = ansicolor_stderr_sink_st;
|
using stderr_color_sink_st = ansicolor_stderr_sink_st;
|
||||||
#endif
|
#endif
|
||||||
} // namespace
|
} // namespace sinks
|
||||||
|
|
||||||
namespace spdlog {
|
template<typename Factory = default_factory>
|
||||||
template<typename Factory = default_factory>
|
inline std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name) {
|
||||||
inline std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name)
|
return Factory::template create<sinks::stdout_color_sink_mt>(logger_name);
|
||||||
{
|
}
|
||||||
return Factory::template create<stdout_color_sink_mt>(logger_name);
|
|
||||||
}
|
|
||||||
template<typename Factory = default_factory>
|
|
||||||
inline std::shared_ptr<logger> stdout_color_st(const std::string &logger_name)
|
|
||||||
{
|
|
||||||
return Factory::template create<stdout_color_sink_st>(logger_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Factory = default_factory>
|
template<typename Factory = default_factory>
|
||||||
inline std::shared_ptr<logger> stderr_color_mt(const std::string &logger_name)
|
inline std::shared_ptr<logger> stdout_color_st(const std::string &logger_name) {
|
||||||
{
|
return Factory::template create<sinks::stdout_color_sink_st>(logger_name);
|
||||||
return Factory::template create<stderr_color_sink_mt>(logger_name);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Factory = default_factory>
|
template<typename Factory = default_factory>
|
||||||
inline std::shared_ptr<logger> stderr_color_st(const std::string &logger_name)
|
inline std::shared_ptr<logger> stderr_color_mt(const std::string &logger_name) {
|
||||||
{
|
return Factory::template create<sinks::stderr_color_sink_mt>(logger_name);
|
||||||
return Factory::template create<stderr_color_sink_mt>(logger_name);
|
}
|
||||||
}
|
|
||||||
|
template<typename Factory = default_factory>
|
||||||
|
inline std::shared_ptr<logger> stderr_color_st(const std::string &logger_name) {
|
||||||
|
return Factory::template create<sinks::stderr_color_sink_mt>(logger_name);
|
||||||
|
}
|
||||||
} // namespace spdlog
|
} // namespace spdlog
|
||||||
|
Loading…
Reference in New Issue
Block a user