Fixed stdout_color_sinks.h namespace

This commit is contained in:
gabime 2018-06-24 01:55:09 +03:00
parent 8fdd26da82
commit e574f57511

View File

@ -12,8 +12,8 @@
#include "spdlog/sinks/ansicolor_sink.h"
#endif
namespace {
using namespace spdlog::sinks;
namespace spdlog {
namespace sinks {
#ifdef _WIN32
using stdout_color_sink_mt = wincolor_stdout_sink_mt;
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_st = ansicolor_stderr_sink_st;
#endif
} // namespace
} // namespace sinks
namespace spdlog {
template<typename Factory = default_factory>
inline std::shared_ptr<logger> stdout_color_mt(const std::string &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>
inline std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name) {
return Factory::template create<sinks::stdout_color_sink_mt>(logger_name);
}
template<typename Factory = default_factory>
inline std::shared_ptr<logger> stderr_color_mt(const std::string &logger_name)
{
return Factory::template create<stderr_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<sinks::stdout_color_sink_st>(logger_name);
}
template<typename Factory = default_factory>
inline std::shared_ptr<logger> stderr_color_st(const std::string &logger_name)
{
return Factory::template create<stderr_color_sink_mt>(logger_name);
}
template<typename Factory = default_factory>
inline std::shared_ptr<logger> stderr_color_mt(const std::string &logger_name) {
return Factory::template create<sinks::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