Hello community, here is the log from the commit of package spdlog for openSUSE:Factory checked in at 2020-07-16 12:07:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/spdlog (Old) and /work/SRC/openSUSE:Factory/.spdlog.new.3592 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "spdlog" Thu Jul 16 12:07:33 2020 rev:13 rq:819807 version:1.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/spdlog/spdlog.changes 2020-07-02 23:59:09.213432588 +0200 +++ /work/SRC/openSUSE:Factory/.spdlog.new.3592/spdlog.changes 2020-07-16 12:07:48.734319231 +0200 @@ -1,0 +2,17 @@ +Thu Jul 9 19:59:07 UTC 2020 - [email protected] + +- Update to version 1.7.0 + * Support fmt version 7.x. + * Fixed to_hex segmentation fault + * Support for FMT_STRING compile time checking. + * Clean CMakeLists.txt. +- Drop spdlog-1.6.1-fmt7_build.patch and + spdlog-1.6.1-fmt7_tests.patch (merged upstream) + +------------------------------------------------------------------- +Wed Jul 8 11:05:02 UTC 2020 - [email protected] + +- Add spdlog-1.6.1-fmt7_build.patch and + spdlog-1.6.1-fmt7_tests.patch to fix build with fmt 7.x + +------------------------------------------------------------------- Old: ---- spdlog-1.6.1.tar.gz New: ---- spdlog-1.7.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ spdlog.spec ++++++ --- /var/tmp/diff_new_pack.dY8GA2/_old 2020-07-16 12:07:49.818320328 +0200 +++ /var/tmp/diff_new_pack.dY8GA2/_new 2020-07-16 12:07:49.822320331 +0200 @@ -18,7 +18,7 @@ %define _sover 1 Name: spdlog -Version: 1.6.1 +Version: 1.7.0 Release: 0 Summary: C++ logging library License: MIT ++++++ spdlog-1.6.1.tar.gz -> spdlog-1.7.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/.travis.yml new/spdlog-1.7.0/.travis.yml --- old/spdlog-1.6.1/.travis.yml 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/.travis.yml 2020-07-09 19:24:20.000000000 +0200 @@ -101,10 +101,10 @@ -DCMAKE_CXX_STANDARD=$CPP \ -DSPDLOG_BUILD_EXAMPLE=ON \ -DSPDLOG_BUILD_EXAMPLE_HO=ON \ - -DSPDLOG_ENABLE_WARNINGS=ON \ + -DSPDLOG_BUILD_WARNINGS=ON \ -DSPDLOG_BUILD_BENCH=OFF \ -DSPDLOG_BUILD_TESTS=ON \ - -DSPDLOG_BUILD_TESTS_HO=OFf \ + -DSPDLOG_BUILD_TESTS_HO=OFF \ -DSPDLOG_SANITIZE_ADDRESS=$ASAN - make VERBOSE=1 -j2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/CMakeLists.txt new/spdlog-1.7.0/CMakeLists.txt --- old/spdlog-1.6.1/CMakeLists.txt 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/CMakeLists.txt 2020-07-09 19:24:20.000000000 +0200 @@ -131,16 +131,15 @@ list(APPEND SPDLOG_SRCS src/fmt.cpp) endif() -if(WIN32 AND SPDLOG_BUILD_SHARED) - list(APPEND SPDLOG_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc) -endif() - if(SPDLOG_BUILD_SHARED) + if(WIN32) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY) + list(APPEND SPDLOG_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc) + endif() add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS}) target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB) - if(WIN32) + if(MSVC) target_compile_options(spdlog PUBLIC /wd4251 /wd4275) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY) endif() if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO) target_compile_definitions(spdlog PRIVATE FMT_EXPORT PUBLIC FMT_SHARED) @@ -200,49 +199,25 @@ # --------------------------------------------------------------------------------------- # Misc definitions according to tweak options # --------------------------------------------------------------------------------------- -if(SPDLOG_WCHAR_SUPPORT) - target_compile_definitions(spdlog PUBLIC SPDLOG_WCHAR_TO_UTF8_SUPPORT) - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_WCHAR_TO_UTF8_SUPPORT) -endif() - -if(SPDLOG_WCHAR_FILENAMES) - target_compile_definitions(spdlog PUBLIC SPDLOG_WCHAR_FILENAMES) - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_WCHAR_FILENAMES) -endif() - -if(SPDLOG_NO_EXCEPTIONS) - target_compile_definitions(spdlog PUBLIC SPDLOG_NO_EXCEPTIONS) - - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_EXCEPTIONS) - - if(NOT MSVC) - target_compile_options(spdlog PRIVATE -fno-exceptions) +set(SPDLOG_WCHAR_TO_UTF8_SUPPORT ${SPDLOG_WCHAR_SUPPORT}) +foreach(SPDLOG_OPTION + SPDLOG_WCHAR_TO_UTF8_SUPPORT + SPDLOG_WCHAR_FILENAMES + SPDLOG_NO_EXCEPTIONS + SPDLOG_CLOCK_COARSE + SPDLOG_PREVENT_CHILD_FD + SPDLOG_NO_THREAD_ID + SPDLOG_NO_TLS + SPDLOG_NO_ATOMIC_LEVELS +) + if(${SPDLOG_OPTION}) + target_compile_definitions(spdlog PUBLIC ${SPDLOG_OPTION}) + target_compile_definitions(spdlog_header_only INTERFACE ${SPDLOG_OPTION}) endif() -endif() - -if(SPDLOG_CLOCK_COARSE) - target_compile_definitions(spdlog PRIVATE SPDLOG_CLOCK_COARSE) - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_CLOCK_COARSE) -endif() - -if(SPDLOG_PREVENT_CHILD_FD) - target_compile_definitions(spdlog PRIVATE SPDLOG_PREVENT_CHILD_FD) - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_PREVENT_CHILD_FD) -endif() - -if(SPDLOG_NO_THREAD_ID) - target_compile_definitions(spdlog PRIVATE SPDLOG_NO_THREAD_ID) - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_THREAD_ID) -endif() - -if(SPDLOG_NO_TLS) - target_compile_definitions(spdlog PRIVATE SPDLOG_NO_TLS) - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_TLS) -endif() +endforeach() -if(SPDLOG_NO_ATOMIC_LEVELS) - target_compile_definitions(spdlog PUBLIC SPDLOG_NO_ATOMIC_LEVELS) - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_ATOMIC_LEVELS) +if(SPDLOG_NO_EXCEPTIONS AND NOT MSVC) + target_compile_options(spdlog PRIVATE -fno-exceptions) endif() # --------------------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/README.md new/spdlog-1.7.0/README.md --- old/spdlog-1.6.1/README.md 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/README.md 2020-07-09 19:24:20.000000000 +0200 @@ -418,6 +418,6 @@ --- -Thanks to [JetBrains](https://www.jetbrains.com/?from=spdlog) for donating licenses to their products to help developing **spdlog** <a href="https://www.jetbrains.com/?from=spdlog"><img src="logos/jetbrains-variant-4.svg" width="94" align="center" /></a> +Thanks to [JetBrains](https://www.jetbrains.com/?from=spdlog) for donating product licenses to help develop **spdlog** <a href="https://www.jetbrains.com/?from=spdlog"><img src="logos/jetbrains-variant-4.svg" width="94" align="center" /></a> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/appveyor.yml new/spdlog-1.7.0/appveyor.yml --- old/spdlog-1.6.1/appveyor.yml 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/appveyor.yml 2020-07-09 19:24:20.000000000 +0200 @@ -40,7 +40,7 @@ set PATH=%PATH%;C:\Program Files\Git\usr\bin - cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_WCHAR_SUPPORT=%WCHAR% -DSPDLOG_BUILD_SHARED=%BUILD_SHARED% -DSPDLOG_BUILD_EXAMPLE=ON -DSPDLOG_BUILD_EXAMPLE_HO=ON -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_TESTS_HO=OFF -DSPDLOG_ENABLE_WARNINGS=ON + cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_WCHAR_SUPPORT=%WCHAR% -DSPDLOG_BUILD_SHARED=%BUILD_SHARED% -DSPDLOG_BUILD_EXAMPLE=ON -DSPDLOG_BUILD_EXAMPLE_HO=ON -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_TESTS_HO=OFF -DSPDLOG_BUILD_WARNINGS=ON cmake --build . --config %BUILD_TYPE% diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/bench/latency.cpp new/spdlog-1.7.0/bench/latency.cpp --- old/spdlog-1.6.1/bench/latency.cpp 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/bench/latency.cpp 2020-07-09 19:24:20.000000000 +0200 @@ -39,6 +39,16 @@ } } +void bench_logger_fmt_string(benchmark::State &state, std::shared_ptr<spdlog::logger> logger) +{ + int i = 0; + for (auto _ : state) + { + logger->info(FMT_STRING("Hello logger: msg number {}..............."), ++i); + ; + } +} + void bench_disabled_macro(benchmark::State &state, std::shared_ptr<spdlog::logger> logger) { int i = 0; @@ -88,6 +98,7 @@ auto null_logger_st = std::make_shared<spdlog::logger>("bench", std::make_shared<null_sink_st>()); benchmark::RegisterBenchmark("null_sink_st (500_bytes c_str)", bench_c_string, std::move(null_logger_st)); benchmark::RegisterBenchmark("null_sink_st", bench_logger, null_logger_st); + benchmark::RegisterBenchmark("null_sink_fmt_string", bench_logger_fmt_string, null_logger_st); // with backtrace of 64 auto tracing_null_logger_st = std::make_shared<spdlog::logger>("bench", std::make_shared<null_sink_st>()); tracing_null_logger_st->enable_backtrace(64); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/cmake/version.rc.in new/spdlog-1.7.0/cmake/version.rc.in --- old/spdlog-1.6.1/cmake/version.rc.in 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/cmake/version.rc.in 2020-07-09 19:24:20.000000000 +0200 @@ -1,5 +1,5 @@ #define APSTUDIO_READONLY_SYMBOLS -#include "winres.h" +#include <windows.h> #undef APSTUDIO_READONLY_SYMBOLS LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/include/spdlog/details/fmt_helper.h new/spdlog-1.7.0/include/spdlog/details/fmt_helper.h --- old/spdlog-1.6.1/include/spdlog/details/fmt_helper.h 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/include/spdlog/details/fmt_helper.h 2020-07-09 19:24:20.000000000 +0200 @@ -34,7 +34,15 @@ inline unsigned int count_digits(T n) { using count_type = typename std::conditional<(sizeof(T) > sizeof(uint32_t)), uint64_t, uint32_t>::type; - return static_cast<unsigned int>(fmt::internal::count_digits(static_cast<count_type>(n))); + return static_cast<unsigned int>(fmt:: +// fmt 7.0.0 renamed the internal namespace to detail. +// See: https://github.com/fmtlib/fmt/issues/1538 +#if FMT_VERSION < 70000 +internal +#else +detail +#endif +::count_digits(static_cast<count_type>(n))); } inline void pad2(int n, memory_buf_t &dest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/include/spdlog/fmt/bin_to_hex.h new/spdlog-1.7.0/include/spdlog/fmt/bin_to_hex.h --- old/spdlog-1.6.1/include/spdlog/fmt/bin_to_hex.h 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/include/spdlog/fmt/bin_to_hex.h 2020-07-09 19:24:20.000000000 +0200 @@ -92,7 +92,7 @@ auto parse(ParseContext &ctx) -> decltype(ctx.begin()) { auto it = ctx.begin(); - while (*it && *it != '}') + while (it != ctx.end() && *it != '}') { switch (*it) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/include/spdlog/logger.h new/spdlog-1.7.0/include/spdlog/logger.h --- old/spdlog-1.6.1/include/spdlog/logger.h 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/include/spdlog/logger.h 2020-07-09 19:24:20.000000000 +0200 @@ -73,63 +73,58 @@ void swap(spdlog::logger &other) SPDLOG_NOEXCEPT; + // FormatString is a type derived from fmt::compile_string + template<typename FormatString, typename std::enable_if<fmt::is_compile_string<FormatString>::value, int>::type = 0, typename... Args> + void log(source_loc loc, level::level_enum lvl, const FormatString &fmt, const Args &... args) + { + log_(loc, lvl, fmt, args...); + } + + // FormatString is NOT a type derived from fmt::compile_string but is a string_view_t or can be implicitly converted to one template<typename... Args> void log(source_loc loc, level::level_enum lvl, string_view_t fmt, const Args &... args) { - bool log_enabled = should_log(lvl); - bool traceback_enabled = tracer_.enabled(); - if (!log_enabled && !traceback_enabled) - { - return; - } - SPDLOG_TRY - { - memory_buf_t buf; - fmt::format_to(buf, fmt, args...); - details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size())); - log_it_(log_msg, log_enabled, traceback_enabled); - } - SPDLOG_LOGGER_CATCH() + log_(loc, lvl, fmt, args...); } - template<typename... Args> - void log(level::level_enum lvl, string_view_t fmt, const Args &... args) + template<typename FormatString, typename... Args> + void log(level::level_enum lvl, const FormatString &fmt, const Args &... args) { log(source_loc{}, lvl, fmt, args...); } - template<typename... Args> - void trace(string_view_t fmt, const Args &... args) + template<typename FormatString, typename... Args> + void trace(const FormatString &fmt, const Args &... args) { log(level::trace, fmt, args...); } - template<typename... Args> - void debug(string_view_t fmt, const Args &... args) + template<typename FormatString, typename... Args> + void debug(const FormatString &fmt, const Args &... args) { log(level::debug, fmt, args...); } - template<typename... Args> - void info(string_view_t fmt, const Args &... args) + template<typename FormatString, typename... Args> + void info(const FormatString &fmt, const Args &... args) { log(level::info, fmt, args...); } - template<typename... Args> - void warn(string_view_t fmt, const Args &... args) + template<typename FormatString, typename... Args> + void warn(const FormatString &fmt, const Args &... args) { log(level::warn, fmt, args...); } - template<typename... Args> - void error(string_view_t fmt, const Args &... args) + template<typename FormatString, typename... Args> + void error(const FormatString &fmt, const Args &... args) { log(level::err, fmt, args...); } - template<typename... Args> - void critical(string_view_t fmt, const Args &... args) + template<typename FormatString, typename... Args> + void critical(const FormatString &fmt, const Args &... args) { log(level::critical, fmt, args...); } @@ -140,8 +135,9 @@ log(source_loc{}, lvl, msg); } - // T can be statically converted to string_view - template<class T, typename std::enable_if<std::is_convertible<const T &, spdlog::string_view_t>::value, T>::type * = nullptr> + // T can be statically converted to string_view and isn't a fmt::compile_string + template<class T, typename std::enable_if< + std::is_convertible<const T &, spdlog::string_view_t>::value && !fmt::is_compile_string<T>::value, int>::type = 0> void log(source_loc loc, level::level_enum lvl, const T &msg) { log(loc, lvl, string_view_t{msg}); @@ -181,7 +177,7 @@ // T cannot be statically converted to string_view or wstring_view template<class T, typename std::enable_if<!std::is_convertible<const T &, spdlog::string_view_t>::value && !is_convertible_to_wstring_view<const T &>::value, - T>::type * = nullptr> + int>::type = 0> void log(source_loc loc, level::level_enum lvl, const T &msg) { log(loc, lvl, "{}", msg); @@ -251,50 +247,8 @@ SPDLOG_LOGGER_CATCH() } - template<typename... Args> - void log(level::level_enum lvl, wstring_view_t fmt, const Args &... args) - { - log(source_loc{}, lvl, fmt, args...); - } - - template<typename... Args> - void trace(wstring_view_t fmt, const Args &... args) - { - log(level::trace, fmt, args...); - } - - template<typename... Args> - void debug(wstring_view_t fmt, const Args &... args) - { - log(level::debug, fmt, args...); - } - - template<typename... Args> - void info(wstring_view_t fmt, const Args &... args) - { - log(level::info, fmt, args...); - } - - template<typename... Args> - void warn(wstring_view_t fmt, const Args &... args) - { - log(level::warn, fmt, args...); - } - - template<typename... Args> - void error(wstring_view_t fmt, const Args &... args) - { - log(level::err, fmt, args...); - } - - template<typename... Args> - void critical(wstring_view_t fmt, const Args &... args) - { - log(level::critical, fmt, args...); - } - // T can be statically converted to wstring_view - template<class T, typename std::enable_if<is_convertible_to_wstring_view<const T &>::value, T>::type * = nullptr> + template<class T, typename std::enable_if<is_convertible_to_wstring_view<const T &>::value, int>::type = 0> void log(source_loc loc, level::level_enum lvl, const T &msg) { bool log_enabled = should_log(lvl); @@ -370,6 +324,26 @@ err_handler custom_err_handler_{nullptr}; details::backtracer tracer_; + // common implementation for after templated public api has been resolved + template<typename FormatString, typename... Args> + void log_(source_loc loc, level::level_enum lvl, const FormatString &fmt, const Args &... args) + { + bool log_enabled = should_log(lvl); + bool traceback_enabled = tracer_.enabled(); + if (!log_enabled && !traceback_enabled) + { + return; + } + SPDLOG_TRY + { + memory_buf_t buf; + fmt::format_to(buf, fmt, args...); + details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size())); + log_it_(log_msg, log_enabled, traceback_enabled); + } + SPDLOG_LOGGER_CATCH() + } + // log the given message (if the given log level is high enough), // and save backtrace (if backtrace is enabled). void log_it_(const details::log_msg &log_msg, bool log_enabled, bool traceback_enabled); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/include/spdlog/spdlog.h new/spdlog-1.7.0/include/spdlog/spdlog.h --- old/spdlog-1.6.1/include/spdlog/spdlog.h 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/include/spdlog/spdlog.h 2020-07-09 19:24:20.000000000 +0200 @@ -121,50 +121,50 @@ SPDLOG_API void set_default_logger(std::shared_ptr<spdlog::logger> default_logger); -template<typename... Args> -inline void log(source_loc source, level::level_enum lvl, string_view_t fmt, const Args &... args) +template<typename FormatString, typename... Args> +inline void log(source_loc source, level::level_enum lvl, const FormatString &fmt, const Args &... args) { default_logger_raw()->log(source, lvl, fmt, args...); } -template<typename... Args> -inline void log(level::level_enum lvl, string_view_t fmt, const Args &... args) +template<typename FormatString, typename... Args> +inline void log(level::level_enum lvl, const FormatString &fmt, const Args &... args) { default_logger_raw()->log(source_loc{}, lvl, fmt, args...); } -template<typename... Args> -inline void trace(string_view_t fmt, const Args &... args) +template<typename FormatString, typename... Args> +inline void trace(const FormatString &fmt, const Args &... args) { default_logger_raw()->trace(fmt, args...); } -template<typename... Args> -inline void debug(string_view_t fmt, const Args &... args) +template<typename FormatString, typename... Args> +inline void debug(const FormatString &fmt, const Args &... args) { default_logger_raw()->debug(fmt, args...); } -template<typename... Args> -inline void info(string_view_t fmt, const Args &... args) +template<typename FormatString, typename... Args> +inline void info(const FormatString &fmt, const Args &... args) { default_logger_raw()->info(fmt, args...); } -template<typename... Args> -inline void warn(string_view_t fmt, const Args &... args) +template<typename FormatString, typename... Args> +inline void warn(const FormatString &fmt, const Args &... args) { default_logger_raw()->warn(fmt, args...); } -template<typename... Args> -inline void error(string_view_t fmt, const Args &... args) +template<typename FormatString, typename... Args> +inline void error(const FormatString &fmt, const Args &... args) { default_logger_raw()->error(fmt, args...); } -template<typename... Args> -inline void critical(string_view_t fmt, const Args &... args) +template<typename FormatString, typename... Args> +inline void critical(const FormatString &fmt, const Args &... args) { default_logger_raw()->critical(fmt, args...); } @@ -217,57 +217,6 @@ default_logger_raw()->critical(msg); } -#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT -template<typename... Args> -inline void log(source_loc source, level::level_enum lvl, wstring_view_t fmt, const Args &... args) -{ - default_logger_raw()->log(source, lvl, fmt, args...); -} - -template<typename... Args> -inline void log(level::level_enum lvl, wstring_view_t fmt, const Args &... args) -{ - default_logger_raw()->log(lvl, fmt, args...); -} - -template<typename... Args> -inline void trace(wstring_view_t fmt, const Args &... args) -{ - default_logger_raw()->trace(fmt, args...); -} - -template<typename... Args> -inline void debug(wstring_view_t fmt, const Args &... args) -{ - default_logger_raw()->debug(fmt, args...); -} - -template<typename... Args> -inline void info(wstring_view_t fmt, const Args &... args) -{ - default_logger_raw()->info(fmt, args...); -} - -template<typename... Args> -inline void warn(wstring_view_t fmt, const Args &... args) -{ - default_logger_raw()->warn(fmt, args...); -} - -template<typename... Args> -inline void error(wstring_view_t fmt, const Args &... args) -{ - default_logger_raw()->error(fmt, args...); -} - -template<typename... Args> -inline void critical(wstring_view_t fmt, const Args &... args) -{ - default_logger_raw()->critical(fmt, args...); -} - -#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT - } // namespace spdlog // diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/include/spdlog/version.h new/spdlog-1.7.0/include/spdlog/version.h --- old/spdlog-1.6.1/include/spdlog/version.h 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/include/spdlog/version.h 2020-07-09 19:24:20.000000000 +0200 @@ -4,7 +4,7 @@ #pragma once #define SPDLOG_VER_MAJOR 1 -#define SPDLOG_VER_MINOR 6 -#define SPDLOG_VER_PATCH 1 +#define SPDLOG_VER_MINOR 7 +#define SPDLOG_VER_PATCH 0 #define SPDLOG_VERSION (SPDLOG_VER_MAJOR * 10000 + SPDLOG_VER_MINOR * 100 + SPDLOG_VER_PATCH) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/tests/CMakeLists.txt new/spdlog-1.7.0/tests/CMakeLists.txt --- old/spdlog-1.6.1/tests/CMakeLists.txt 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/tests/CMakeLists.txt 2020-07-09 19:24:20.000000000 +0200 @@ -2,46 +2,46 @@ project(spdlog_utests CXX) -if(NOT TARGET spdlog) +if (NOT TARGET spdlog) # Stand-alone build find_package(spdlog REQUIRED) -endif() +endif () include(../cmake/utils.cmake) find_package(PkgConfig) -if(PkgConfig_FOUND) +if (PkgConfig_FOUND) pkg_check_modules(systemd libsystemd) -endif() +endif () set(SPDLOG_UTESTS_SOURCES - test_file_helper.cpp - test_file_logging.cpp - test_daily_logger.cpp - test_misc.cpp - test_eventlog.cpp - test_pattern_formatter.cpp - test_async.cpp - test_registry.cpp - test_macros.cpp - utils.cpp - main.cpp - test_mpmc_q.cpp - test_dup_filter.cpp - test_fmt_helper.cpp - test_stdout_api.cpp - test_backtrace.cpp - test_create_dir.cpp - test_cfg.cpp - test_time_point.cpp) + test_file_helper.cpp + test_file_logging.cpp + test_daily_logger.cpp + test_misc.cpp + test_eventlog.cpp + test_pattern_formatter.cpp + test_async.cpp + test_registry.cpp + test_macros.cpp + utils.cpp + main.cpp + test_mpmc_q.cpp + test_dup_filter.cpp + test_fmt_helper.cpp + test_stdout_api.cpp + test_backtrace.cpp + test_create_dir.cpp + test_cfg.cpp + test_time_point.cpp) -if(NOT SPDLOG_NO_EXCEPTIONS) +if (NOT SPDLOG_NO_EXCEPTIONS) list(APPEND SPDLOG_UTESTS_SOURCES test_errors.cpp) -endif() +endif () -if(systemd_FOUND) +if (systemd_FOUND) list(APPEND SPDLOG_UTESTS_SOURCES test_systemd.cpp) -endif() +endif () enable_testing() @@ -49,22 +49,22 @@ add_executable(${test_target} ${SPDLOG_UTESTS_SOURCES}) spdlog_enable_warnings(${test_target}) target_link_libraries(${test_target} PRIVATE ${spdlog_lib}) - if(systemd_FOUND) + if (systemd_FOUND) target_link_libraries(${test_target} PRIVATE ${systemd_LIBRARIES}) - endif() - if(SPDLOG_SANITIZE_ADDRESS) + endif () + if (SPDLOG_SANITIZE_ADDRESS) spdlog_enable_sanitizer(${test_target}) - endif() + endif () add_test(NAME ${test_target} COMMAND ${test_target}) set_tests_properties(${test_target} PROPERTIES RUN_SERIAL ON) endfunction() # The compiled library tests -if(SPDLOG_BUILD_TESTS OR SPDLOG_BUILD_ALL) +if (SPDLOG_BUILD_TESTS OR SPDLOG_BUILD_ALL) spdlog_prepare_test(spdlog-utests spdlog::spdlog) -endif() +endif () # The header-only library version tests -if(SPDLOG_BUILD_TESTS_HO OR SPDLOG_BUILD_ALL) +if (SPDLOG_BUILD_TESTS_HO OR SPDLOG_BUILD_ALL) spdlog_prepare_test(spdlog-utests-ho spdlog::spdlog_header_only) -endif() +endif () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spdlog-1.6.1/tests/test_mpmc_q.cpp new/spdlog-1.7.0/tests/test_mpmc_q.cpp --- old/spdlog-1.6.1/tests/test_mpmc_q.cpp 2020-05-26 23:02:51.000000000 +0200 +++ new/spdlog-1.7.0/tests/test_mpmc_q.cpp 2020-07-09 19:24:20.000000000 +0200 @@ -10,7 +10,7 @@ TEST_CASE("dequeue-empty-nowait", "[mpmc_blocking_q]") { size_t q_size = 100; - milliseconds tolerance_wait(10); + milliseconds tolerance_wait(20); spdlog::details::mpmc_blocking_queue<int> q(q_size); int popped_item = 0;
