mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Added final keywords to sinks and pattern_formatter.cpp
This commit is contained in:
parent
4ee50804d3
commit
15829cfb84
@ -82,13 +82,13 @@ private:
|
||||
};
|
||||
|
||||
template <typename Mutex>
|
||||
class ansicolor_stdout_sink : public ansicolor_sink<Mutex> {
|
||||
class ansicolor_stdout_sink final : public ansicolor_sink<Mutex> {
|
||||
public:
|
||||
explicit ansicolor_stdout_sink(color_mode mode = color_mode::automatic);
|
||||
};
|
||||
|
||||
template <typename Mutex>
|
||||
class ansicolor_stderr_sink : public ansicolor_sink<Mutex> {
|
||||
class ansicolor_stderr_sink final : public ansicolor_sink<Mutex> {
|
||||
public:
|
||||
explicit ansicolor_stderr_sink(color_mode mode = color_mode::automatic);
|
||||
};
|
||||
|
@ -19,7 +19,7 @@ namespace sinks {
|
||||
* MSVC sink (logging using OutputDebugStringA)
|
||||
*/
|
||||
template <typename Mutex>
|
||||
class msvc_sink : public base_sink<Mutex> {
|
||||
class msvc_sink final : public base_sink<Mutex> {
|
||||
public:
|
||||
msvc_sink() = default;
|
||||
msvc_sink(bool check_debugger_present)
|
||||
|
@ -13,7 +13,7 @@ namespace spdlog {
|
||||
namespace sinks {
|
||||
|
||||
template <typename Mutex>
|
||||
class null_sink : public base_sink<Mutex> {
|
||||
class null_sink final : public base_sink<Mutex> {
|
||||
protected:
|
||||
void sink_it_(const details::log_msg &) override {}
|
||||
void flush_() override {}
|
||||
|
@ -40,13 +40,13 @@ private:
|
||||
};
|
||||
|
||||
template <typename Mutex>
|
||||
class stdout_sink : public stdout_sink_base<Mutex> {
|
||||
class stdout_sink final : public stdout_sink_base<Mutex> {
|
||||
public:
|
||||
stdout_sink();
|
||||
};
|
||||
|
||||
template <typename Mutex>
|
||||
class stderr_sink : public stdout_sink_base<Mutex> {
|
||||
class stderr_sink final : public stdout_sink_base<Mutex> {
|
||||
public:
|
||||
stderr_sink();
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ namespace sinks {
|
||||
* Sink that write to syslog using the `syscall()` library call.
|
||||
*/
|
||||
template <typename Mutex>
|
||||
class syslog_sink : public base_sink<Mutex> {
|
||||
class syslog_sink final : public base_sink<Mutex> {
|
||||
public:
|
||||
syslog_sink(std::string ident, int syslog_option, int syslog_facility, bool enable_formatting)
|
||||
: enable_formatting_{enable_formatting},
|
||||
|
@ -39,7 +39,7 @@ struct tcp_sink_config {
|
||||
};
|
||||
|
||||
template <typename Mutex>
|
||||
class tcp_sink : public spdlog::sinks::base_sink<Mutex> {
|
||||
class tcp_sink final : public spdlog::sinks::base_sink<Mutex> {
|
||||
public:
|
||||
// connect to tcp host/port or throw if failed
|
||||
// host can be hostname or ip address
|
||||
|
@ -33,7 +33,7 @@ struct udp_sink_config {
|
||||
};
|
||||
|
||||
template <typename Mutex>
|
||||
class udp_sink : public spdlog::sinks::base_sink<Mutex> {
|
||||
class udp_sink final : public spdlog::sinks::base_sink<Mutex> {
|
||||
public:
|
||||
// host can be hostname or ip address
|
||||
explicit udp_sink(udp_sink_config sink_config)
|
||||
|
@ -147,7 +147,7 @@ public:
|
||||
static std::array<const char *, 7> full_days{{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}};
|
||||
|
||||
template <typename ScopedPadder>
|
||||
class A_formatter : public flag_formatter {
|
||||
class A_formatter final : public flag_formatter {
|
||||
public:
|
||||
explicit A_formatter(padding_info padinfo)
|
||||
: flag_formatter(padinfo) {}
|
||||
@ -741,7 +741,7 @@ private:
|
||||
// Class for formatting Mapped Diagnostic Context (MDC) in log messages.
|
||||
// Example: [logger-name] [info] [mdc_key_1:mdc_value_1 mdc_key_2:mdc_value_2] some message
|
||||
template <typename ScopedPadder>
|
||||
class mdc_formatter : public flag_formatter {
|
||||
class mdc_formatter final : public flag_formatter {
|
||||
public:
|
||||
explicit mdc_formatter(padding_info padinfo)
|
||||
: flag_formatter(padinfo) {}
|
||||
|
Loading…
Reference in New Issue
Block a user