Updated copyright headers

This commit is contained in:
gabime 2019-06-04 00:09:16 +03:00
parent eea9d6136f
commit bcfa9241b8
56 changed files with 145 additions and 126 deletions

View File

@ -64,7 +64,7 @@ int main(int argc, char *argv[])
if (argc > 3) if (argc > 3)
{ {
queue_size = atoi(argv[3]); queue_size = atoi(argv[3]);
if(queue_size > 500000) if (queue_size > 500000)
{ {
spdlog::error("Max queue size allowed: 500,000"); spdlog::error("Max queue size allowed: 500,000");
exit(1); exit(1);
@ -79,7 +79,7 @@ int main(int argc, char *argv[])
spdlog::info("Messages : {:n}", howmany); spdlog::info("Messages : {:n}", howmany);
spdlog::info("Threads : {:n}", threads); spdlog::info("Threads : {:n}", threads);
spdlog::info("Queue : {:n} slots", queue_size); spdlog::info("Queue : {:n} slots", queue_size);
spdlog::info("Queue memory : {:n} x {} = {:n} KB ", queue_size, slot_size, (queue_size * slot_size)/1024); spdlog::info("Queue memory : {:n} x {} = {:n} KB ", queue_size, slot_size, (queue_size * slot_size) / 1024);
spdlog::info("Total iters : {:n}", iters); spdlog::info("Total iters : {:n}", iters);
spdlog::info("-------------------------------------------------"); spdlog::info("-------------------------------------------------");

View File

@ -102,7 +102,7 @@ int main(int argc, char *argv[])
spdlog::info("Messages: {:n}", howmany); spdlog::info("Messages: {:n}", howmany);
spdlog::info("Queue size: {:n} slots", queue_size); spdlog::info("Queue size: {:n} slots", queue_size);
auto slot_size = sizeof(spdlog::details::async_msg); auto slot_size = sizeof(spdlog::details::async_msg);
spdlog::info("Total queue memory: {}x{} bytes per slot = {:n} Kb ", queue_size, slot_size, (queue_size * slot_size)/1024); spdlog::info("Total queue memory: {}x{} bytes per slot = {:n} Kb ", queue_size, slot_size, (queue_size * slot_size) / 1024);
spdlog::info("**************************************************************"); spdlog::info("**************************************************************");
for (int i = 0; i < iters; ++i) for (int i = 0; i < iters; ++i)

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once
@ -223,7 +223,6 @@ std::unique_ptr<T> make_unique(Args &&... args)
#endif #endif
} // namespace details } // namespace details
} // namespace spdlog } // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY #ifdef SPDLOG_HEADER_ONLY

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
// cirucal q view of std::vector. // cirucal q view of std::vector.

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once
@ -371,7 +371,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT
#ifdef _WIN32 #ifdef _WIN32
return true; return true;
#else #else
static constexpr std::array<const char *, 14>Terms = { static constexpr std::array<const char *, 14> Terms = {
"ansi", "color", "console", "cygwin", "gnome", "konsole", "kterm", "linux", "msys", "putty", "rxvt", "screen", "vt100", "xterm"}; "ansi", "color", "console", "cygwin", "gnome", "konsole", "kterm", "linux", "msys", "putty", "rxvt", "screen", "vt100", "xterm"};
const char *env_p = std::getenv("TERM"); const char *env_p = std::getenv("TERM");

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once
@ -163,7 +163,7 @@ static int to12h(const tm &t)
} }
// Abbreviated weekday name // Abbreviated weekday name
static std::array<const char*, 7> days{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; static std::array<const char *, 7> days{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
class a_formatter : public flag_formatter class a_formatter : public flag_formatter
{ {
public: public:
@ -197,7 +197,7 @@ public:
}; };
// Abbreviated month // Abbreviated month
static const std::array<const char *, 12> months {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"}; static const std::array<const char *, 12> months{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"};
class b_formatter : public flag_formatter class b_formatter : public flag_formatter
{ {
public: public:
@ -214,7 +214,7 @@ public:
}; };
// Full month name // Full month name
static const std::array<const char *, 12> full_months { static const std::array<const char *, 12> full_months{
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
class B_formatter : public flag_formatter class B_formatter : public flag_formatter
@ -305,7 +305,8 @@ class Y_formatter final : public flag_formatter
{ {
public: public:
explicit Y_formatter(padding_info padinfo) explicit Y_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
{ {
@ -368,7 +369,8 @@ class I_formatter final : public flag_formatter
{ {
public: public:
explicit I_formatter(padding_info padinfo) explicit I_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
{ {
@ -383,7 +385,8 @@ class M_formatter final : public flag_formatter
{ {
public: public:
explicit M_formatter(padding_info padinfo) explicit M_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
{ {
@ -398,7 +401,8 @@ class S_formatter final : public flag_formatter
{ {
public: public:
explicit S_formatter(padding_info padinfo) explicit S_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
{ {
@ -413,7 +417,8 @@ class e_formatter final : public flag_formatter
{ {
public: public:
explicit e_formatter(padding_info padinfo) explicit e_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -436,7 +441,8 @@ class f_formatter final : public flag_formatter
{ {
public: public:
explicit f_formatter(padding_info padinfo) explicit f_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -459,7 +465,8 @@ class F_formatter final : public flag_formatter
{ {
public: public:
explicit F_formatter(padding_info padinfo) explicit F_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -482,7 +489,8 @@ class E_formatter final : public flag_formatter
{ {
public: public:
explicit E_formatter(padding_info padinfo) explicit E_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -499,7 +507,8 @@ class p_formatter final : public flag_formatter
{ {
public: public:
explicit p_formatter(padding_info padinfo) explicit p_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
{ {
@ -514,7 +523,8 @@ class r_formatter final : public flag_formatter
{ {
public: public:
explicit r_formatter(padding_info padinfo) explicit r_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
{ {
@ -536,7 +546,8 @@ class R_formatter final : public flag_formatter
{ {
public: public:
explicit R_formatter(padding_info padinfo) explicit R_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
{ {
@ -554,7 +565,8 @@ class T_formatter final : public flag_formatter
{ {
public: public:
explicit T_formatter(padding_info padinfo) explicit T_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override void format(const details::log_msg &, const std::tm &tm_time, fmt::memory_buffer &dest) override
{ {
@ -574,9 +586,8 @@ class z_formatter final : public flag_formatter
{ {
public: public:
explicit z_formatter(padding_info padinfo) explicit z_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
z_formatter() = default; z_formatter() = default;
z_formatter(const z_formatter &) = delete; z_formatter(const z_formatter &) = delete;
@ -634,7 +645,8 @@ class t_formatter final : public flag_formatter
{ {
public: public:
explicit t_formatter(padding_info padinfo) explicit t_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -656,7 +668,8 @@ class pid_formatter final : public flag_formatter
{ {
public: public:
explicit pid_formatter(padding_info padinfo) explicit pid_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -678,7 +691,8 @@ class v_formatter final : public flag_formatter
{ {
public: public:
explicit v_formatter(padding_info padinfo) explicit v_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -762,7 +776,8 @@ class source_location_formatter final : public flag_formatter
{ {
public: public:
explicit source_location_formatter(padding_info padinfo) explicit source_location_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -791,7 +806,8 @@ class source_filename_formatter final : public flag_formatter
{ {
public: public:
explicit source_filename_formatter(padding_info padinfo) explicit source_filename_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -808,7 +824,8 @@ class source_linenum_formatter final : public flag_formatter
{ {
public: public:
explicit source_linenum_formatter(padding_info padinfo) explicit source_linenum_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {
@ -833,7 +850,8 @@ class source_funcname_formatter final : public flag_formatter
{ {
public: public:
explicit source_funcname_formatter(padding_info padinfo) explicit source_funcname_formatter(padding_info padinfo)
: flag_formatter(padinfo){} : flag_formatter(padinfo)
{}
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{ {

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once
@ -8,15 +8,17 @@
namespace spdlog { namespace spdlog {
// Default logger factory- creates synchronous loggers // Default logger factory- creates synchronous loggers
class logger; class logger;
struct synchronous_factory { struct synchronous_factory
{
template<typename Sink, typename... SinkArgs> template<typename Sink, typename... SinkArgs>
static std::shared_ptr<spdlog::logger> create(std::string logger_name, SinkArgs &&... args) { static std::shared_ptr<spdlog::logger> create(std::string logger_name, SinkArgs &&... args)
{
auto sink = std::make_shared<Sink>(std::forward<SinkArgs>(args)...); auto sink = std::make_shared<Sink>(std::forward<SinkArgs>(args)...);
auto new_logger = std::make_shared<spdlog::logger>(std::move(logger_name), std::move(sink)); auto new_logger = std::make_shared<spdlog::logger>(std::move(logger_name), std::move(sink));
details::registry::instance().initialize_logger(new_logger); details::registry::instance().initialize_logger(new_logger);
return new_logger; return new_logger;
} }
}; };
} } // namespace spdlog

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once
@ -32,9 +32,9 @@ class logger
{ {
public: public:
// Empty logger // Empty logger
explicit logger(std::string name) : explicit logger(std::string name)
name_(std::move(name)), : name_(std::move(name))
sinks_() , sinks_()
{} {}
// Logger with range on sinks // Logger with range on sinks
@ -54,8 +54,6 @@ public:
: logger(std::move(name), sinks.begin(), sinks.end()) : logger(std::move(name), sinks.begin(), sinks.end())
{} {}
virtual ~logger() = default; virtual ~logger() = default;
logger(const logger &) = delete; logger(const logger &) = delete;

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once
@ -77,7 +77,6 @@ private:
void print_range_(const fmt::memory_buffer &formatted, size_t start, size_t end); void print_range_(const fmt::memory_buffer &formatted, size_t start, size_t end);
}; };
using ansicolor_stdout_sink_mt = ansicolor_sink<details::console_stdout, details::console_mutex>; using ansicolor_stdout_sink_mt = ansicolor_sink<details::console_stdout, details::console_mutex>;
using ansicolor_stdout_sink_st = ansicolor_sink<details::console_stdout, details::console_nullmutex>; using ansicolor_stdout_sink_st = ansicolor_sink<details::console_stdout, details::console_nullmutex>;

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once
@ -26,7 +26,6 @@ using stderr_color_sink_st = ansicolor_stderr_sink_st;
#endif #endif
} // namespace sinks } // namespace sinks
template<typename Factory = spdlog::synchronous_factory> template<typename Factory = spdlog::synchronous_factory>
std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name, color_mode mode = color_mode::automatic); std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name, color_mode mode = color_mode::automatic);

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
// spdlog main header file. // spdlog main header file.

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once

View File

@ -1,4 +1,4 @@
// Copyright(c) 2015-present Gabi Melman & spdlog contributors. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#ifndef SPDLOG_COMPILED_LIB #ifndef SPDLOG_COMPILED_LIB
@ -58,10 +58,14 @@ template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stderr, sp
#endif #endif
#include "spdlog/sinks/stdout_color_sinks-inl.h" #include "spdlog/sinks/stdout_color_sinks-inl.h"
template std::shared_ptr<spdlog::logger> spdlog::stdout_color_mt<spdlog::synchronous_factory>(const std::string &logger_name, color_mode mode); template std::shared_ptr<spdlog::logger> spdlog::stdout_color_mt<spdlog::synchronous_factory>(
template std::shared_ptr<spdlog::logger> spdlog::stdout_color_st<spdlog::synchronous_factory>(const std::string &logger_name, color_mode mode); const std::string &logger_name, color_mode mode);
template std::shared_ptr<spdlog::logger> spdlog::stderr_color_mt<spdlog::synchronous_factory>(const std::string &logger_name, color_mode mode); template std::shared_ptr<spdlog::logger> spdlog::stdout_color_st<spdlog::synchronous_factory>(
template std::shared_ptr<spdlog::logger> spdlog::stderr_color_st<spdlog::synchronous_factory>(const std::string &logger_name, color_mode mode); const std::string &logger_name, color_mode mode);
template std::shared_ptr<spdlog::logger> spdlog::stderr_color_mt<spdlog::synchronous_factory>(
const std::string &logger_name, color_mode mode);
template std::shared_ptr<spdlog::logger> spdlog::stderr_color_st<spdlog::synchronous_factory>(
const std::string &logger_name, color_mode mode);
template std::shared_ptr<spdlog::logger> spdlog::stdout_color_mt<spdlog::async_factory>(const std::string &logger_name, color_mode mode); template std::shared_ptr<spdlog::logger> spdlog::stdout_color_mt<spdlog::async_factory>(const std::string &logger_name, color_mode mode);
template std::shared_ptr<spdlog::logger> spdlog::stdout_color_st<spdlog::async_factory>(const std::string &logger_name, color_mode mode); template std::shared_ptr<spdlog::logger> spdlog::stdout_color_st<spdlog::async_factory>(const std::string &logger_name, color_mode mode);