2019-06-03 17:09:16 -04:00
|
|
|
// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
|
2019-05-12 09:11:35 -04:00
|
|
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-05-12 17:09:00 -04:00
|
|
|
#ifndef SPDLOG_HEADER_ONLY
|
|
|
|
#include "spdlog/sinks/stdout_color_sinks.h"
|
|
|
|
#endif
|
|
|
|
|
2019-05-12 09:11:35 -04:00
|
|
|
#include "spdlog/logger.h"
|
|
|
|
#include "spdlog/common.h"
|
|
|
|
|
|
|
|
namespace spdlog {
|
|
|
|
|
|
|
|
template<typename Factory>
|
2019-05-24 05:33:14 -04:00
|
|
|
SPDLOG_INLINE std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name, color_mode mode)
|
2019-05-12 09:11:35 -04:00
|
|
|
{
|
2019-05-24 05:33:14 -04:00
|
|
|
return Factory::template create<sinks::stdout_color_sink_mt>(logger_name, mode);
|
2019-05-12 09:11:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename Factory>
|
2019-05-24 05:33:14 -04:00
|
|
|
SPDLOG_INLINE std::shared_ptr<logger> stdout_color_st(const std::string &logger_name, color_mode mode)
|
2019-05-12 09:11:35 -04:00
|
|
|
{
|
2019-05-24 05:33:14 -04:00
|
|
|
return Factory::template create<sinks::stdout_color_sink_st>(logger_name, mode);
|
2019-05-12 09:11:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename Factory>
|
2019-05-24 05:33:14 -04:00
|
|
|
SPDLOG_INLINE std::shared_ptr<logger> stderr_color_mt(const std::string &logger_name, color_mode mode)
|
2019-05-12 09:11:35 -04:00
|
|
|
{
|
2019-05-24 05:33:14 -04:00
|
|
|
return Factory::template create<sinks::stderr_color_sink_mt>(logger_name, mode);
|
2019-05-12 09:11:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename Factory>
|
2019-05-24 05:33:14 -04:00
|
|
|
SPDLOG_INLINE std::shared_ptr<logger> stderr_color_st(const std::string &logger_name, color_mode mode)
|
2019-05-12 09:11:35 -04:00
|
|
|
{
|
2019-05-24 05:33:14 -04:00
|
|
|
return Factory::template create<sinks::stderr_color_sink_st>(logger_name, mode);
|
2019-05-12 09:11:35 -04:00
|
|
|
}
|
|
|
|
} // namespace spdlog
|