File indexing completed on 2025-12-17 10:29:02
0001
0002
0003
0004 #pragma once
0005
0006 #ifdef _WIN32
0007 #include <spdlog/sinks/wincolor_sink.h>
0008 #else
0009 #include <spdlog/sinks/ansicolor_sink.h>
0010 #endif
0011
0012 #include <spdlog/details/synchronous_factory.h>
0013
0014 namespace spdlog {
0015 namespace sinks {
0016 #ifdef _WIN32
0017 using stdout_color_sink_mt = wincolor_stdout_sink_mt;
0018 using stdout_color_sink_st = wincolor_stdout_sink_st;
0019 using stderr_color_sink_mt = wincolor_stderr_sink_mt;
0020 using stderr_color_sink_st = wincolor_stderr_sink_st;
0021 #else
0022 using stdout_color_sink_mt = ansicolor_stdout_sink_mt;
0023 using stdout_color_sink_st = ansicolor_stdout_sink_st;
0024 using stderr_color_sink_mt = ansicolor_stderr_sink_mt;
0025 using stderr_color_sink_st = ansicolor_stderr_sink_st;
0026 #endif
0027 }
0028
0029 template <typename Factory = spdlog::synchronous_factory>
0030 std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name,
0031 color_mode mode = color_mode::automatic);
0032
0033 template <typename Factory = spdlog::synchronous_factory>
0034 std::shared_ptr<logger> stdout_color_st(const std::string &logger_name,
0035 color_mode mode = color_mode::automatic);
0036
0037 template <typename Factory = spdlog::synchronous_factory>
0038 std::shared_ptr<logger> stderr_color_mt(const std::string &logger_name,
0039 color_mode mode = color_mode::automatic);
0040
0041 template <typename Factory = spdlog::synchronous_factory>
0042 std::shared_ptr<logger> stderr_color_st(const std::string &logger_name,
0043 color_mode mode = color_mode::automatic);
0044
0045 }
0046
0047 #ifdef SPDLOG_HEADER_ONLY
0048 #include "stdout_color_sinks-inl.h"
0049 #endif