mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
More template instantiations for static lib
This commit is contained in:
parent
01f5efa1d9
commit
8b4eedb594
34
include/spdlog/sinks/stdout_color_sinks-inl.h
Normal file
34
include/spdlog/sinks/stdout_color_sinks-inl.h
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
|
||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "spdlog/logger.h"
|
||||
#include "spdlog/common.h"
|
||||
|
||||
namespace spdlog {
|
||||
|
||||
template<typename Factory>
|
||||
SPDLOG_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>
|
||||
SPDLOG_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>
|
||||
SPDLOG_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>
|
||||
SPDLOG_INLINE std::shared_ptr<logger> stderr_color_st(const std::string &logger_name)
|
||||
{
|
||||
return Factory::template create<sinks::stderr_color_sink_st>(logger_name);
|
||||
}
|
||||
} // namespace spdlog
|
@ -29,26 +29,19 @@ using stderr_color_sink_st = ansicolor_stderr_sink_st;
|
||||
} // namespace sinks
|
||||
|
||||
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);
|
||||
}
|
||||
std::shared_ptr<logger> stdout_color_mt(const std::string &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);
|
||||
}
|
||||
std::shared_ptr<logger> stdout_color_st(const std::string &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);
|
||||
}
|
||||
std::shared_ptr<logger> stderr_color_mt(const std::string &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_st>(logger_name);
|
||||
}
|
||||
std::shared_ptr<logger> stderr_color_st(const std::string &logger_name);
|
||||
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
#include "stdout_color_sinks-inl.h"
|
||||
#endif
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
|
||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
@ -18,7 +20,7 @@ SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::wincolor_sink()
|
||||
}
|
||||
|
||||
template<typename TargetStream, typename ConsoleMutex>
|
||||
SPDLOG_INLINE SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::~wincolor_sink()
|
||||
SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::~wincolor_sink()
|
||||
{
|
||||
this->flush();
|
||||
}
|
||||
|
@ -69,3 +69,7 @@ using wincolor_stderr_sink_st = wincolor_sink<details::console_stderr, details::
|
||||
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
#include "wincolor_sink-inl.h"
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user