Releases: gabime/spdlog
Version 1.9.1
-
Support for {fmt}'s compile time validation of format strings (#2008). Thanks @dkavolis !
In C++20:spdlog::info("{:d}", "bad format_arg"); // should not compile
In C++14/17 - format string can be validated at compile time using FMT_STRING:
spdlog::info(FMT_STRING("{:d}"), "bad format_arg"); // should not compile
-
Fixed compilation error in Clang 13 with C++20 (#2011, #2013) Thanks @sjanel !
Version 1.9.0
What's new
- Support for {fmt} lib version 8.x.
- New MongoDB sink #1981 . Thanks @mguludag.
- New QTextEdit and QPlainTextEdit sinks #1986. Thanks @mguludag.
Fixes and Improvements
- Fixed #1790 (build failed with v140_xp, v141_xp toolset flags ). Thanks @LonghronShen.
- Fixed #1916 (fix Xcode compiler warning). Thanks @haifengkao.
- Made mutex member variable mutable #1918. Thanks @matt77hias.
- Changed c-style casts to reinterpret casts in tcp_client #1924. Thanks @ lnovey .
- Fix #533 . Rethrnow non std exceptions.
- Avoid harmless warning about unreachable statement in MSVS build #1930. Thanks @vadz.
- Fixed warning about testing _WIN64 which might be undefined #1931. THanks @vadz.
- Small code improvement (std::find) #1933. Thanks @neheb .
- Added support for CMake policy CMP0077 #1946. Thanks @JB-55,
- Allow compilation with nvc++ (and possibly PGI) #1958. Thanks @mlund .
- Fixed C++20 build resulting in deprecated implicit copy assignment operator warning #1961. Thanks @JB-55.
- Fix signed/unsigned mismatch in VS #1970 . Thanks @bansan85.
- Use std::function for the global error handler #1971. Thanks @SpriteOvO .
- Fixed dup sink compile warnings in older compilers with back_inserter.
- Added a color-terminal type #1984 to the color terminals list - to show colors in in RISC-V64 machines. Thanks @hctym1995.
Version 1.8.5
Fix compiling with C++17: remove constexpr
on level_string_views. Thanks @stevenlunt (#1889).
Version 1.8.4
Remove version requirement from find_package
when searching external fmt. #1890. Thanks @prince-chrismc
Version 1.8.3
- New hourly file sink . Creates new file every hour. Can be limited to retain only the last N files. Thanks @BVonk (#1763).
- New daily sink filename custom formatting. Users now can pass custom
strftime
pattern to the log filename. For example:daily_logger_format_mt("loggername", "log-%Y%m%d:%H:%M.txt", hours, minutes);
. Thanks @fawdlstty (#1847). - Fix windows event sink log compilation with UNICODE preprocessor. Thanks @iko1 (#1760).
- Add SPDLOG_DISABLE_DEFAULT_LOGGER as a CMake option. Thanks @shimaowo (#1765, #1766).
- Improve color terminal detection. Thanks @dominicpoeschko (#1768).
- Prevent windows color sink to leak windows headers into user code Thanks @Ryan-rsm-McKenzie (#1771).
- Ensure SPDLOG_FMT_EXTERNAL is honored in the bench program. Thanks @Ryan-rsm-McKenzie (#1773).
- Skip CMake module mode when finding fmt. Thanks @Ryan-rsm-McKenzie (#1774).
- Better support for "/" separators on Windows, and improve wchar filename test coverage. Thanks @sylveon (#1787).
- Open files with "ab" mode even if truncating to better support logrotate(8). Thanks @graydon (#1795).
- Fix compiling error and typo in hourly file sink. Thanks @sillykelvin (#1805).
- Add constexpr to SPDLOG_LEVEL_NAMES declaration. Thanks @gv-me (#1798).
- Initializer list style consistency. Thanks @ChristianPanov (#1807).
- Fix call to non-constexpr function (#1811).
- Better
numeric_limits<>::max/min
fix whenSPDLOG_WCHAR_TO_UTF8_SUPPORT
is defined. Thanks @nukeulater (#1819). - Fix to prevent MSVC warning flags to propagate to CUDA. Thanks @prateek9623 (#1825, #1829).
- Fix windows stdout_sink raising exception when used GUI Windows Apps that lack a console. Thanks @dgehri for reporting (#1828).
- Simplified wincolor sink code and intensify the red and yellow colors.
- Set default value to
registry::err_handler_
to resolve Klocwork warning. . Thanks @jneruda (#1835). - Formatter bench: Fix compilation by avoiding function name decay mechanics. Thanks @MathiasMagnus (#1846).
- Add build2 package support in readme. Thanks @Klaim (#1851).
- Make sure __cplusplus is defined under msvc CMakeLists.txt
- Fixed VS2019 W4 cast warning (#1876).
- Fix warning whe the compilation flag
-Wswitch-default
is present. Thanks @imsherlock (#1882).
Version 1.8.2
- Bump fmt to version 7.1.3
- Download automatically googlebenchmark for bench tests (#1709) Thanks @kitattyor.
- Add CPack debian package settings (#1712) and fix typo in comment (#1711). Thanks @ChristofKaufmann.
- Perfect forwarding fmt arguments (#1726). Thanks @dkavolis.
- Fix
dup_filter_sink
to log current log call's level, instead of the filtered log call's level (#1710). Thanks @Tridacnid for reporting. - Ability to get size of messages queue of async thread pool (#1735) Thanks @o2gy84.
- Add missing include (#1742). Thanks @jwittbrodt.
- Updated
bin_to_hex
example in the readme (#1744). Thanks @ArnaudBienner. - Fix async periodic flush test (#1749). Thanks @bluescarni.
Version 1.8.1
- Fixed
load_env_levels()
andload_argv_levels()
#1680 (thanks @Tridacnid ). - Fixed
stdout sink
that produced extra carriage returns on Windows #1675 (thanks @chris-t-w ). - Fixed
msvc_sink
including windows.h #1667 (thanks @Ryan-rsm-McKenzie). - Fixed
stopwatch
's clock to usechrono::steady_clock
#1676 (thanks @SuperWig). - Added support for Rcpp (R cpp compiler) #1685 (thanks @eddelbuettel).
Version 1.8.0
- Upgraded bundled fmt to version 7.0.3.
- New stopwatch utility for quick & easy logging of elapsed time:
#include "spdlog/stopwatch.h"
void stopwatch_example()
{
spdlog::stopwatch sw;
// do some work..
spdlog::debug("Elapsed: {} seconds", sw); // => "Elapsed 0.005116733 seconds"
spdlog::debug("Elapsed: {:.3} seconds", sw); // => "Elapsed 0.005 seconds"
}
- Raised CMake requirement to 3.10 and cleanup CMakeLists.txt (#1624). Thanks @tambry.
- Added
get_level()
andshould_log()
functions to thespdlog::
namespace (#1628). Thanks @eyalroz. - Fixed tcp_client for macOS (#1640). Thanks @dkruempe.
- Fixed
cfg::load_env_levels()
function declaration (#1651). Thanks @bareya. - Updated Fedora install info in the readme (#1653). Thanks @gk6k6k.
- Fixed #1617 (aligned function pattern flag is broken). Thanks @VelocityRa for reporting.
- Fixed #1581 (compiling under msys in win10).
Version 1.7.0
- Support for using external fmt version 7.x (bundled version is 6.2.1). Thanks @candrews .(22bee81).
- Fixed
to_hex
segmentation fault (#1611, 19f2804). Thanks @vitaut, @xvitaly, @kekePower and @lgbaldoni. - Support for
FMT_STRING
compile time checking. Thanks @Tridacnid (30ee690). - Fixed shared library building failure on Windows with non MSVC. Thanks @podsvirov (fe97a03).
- Fixed mingw testcase. Thanks @podsvirov (075dcee).
- Clean CMakeLists.txt. Thanks @Pospelove (cf55e5d).
Version 1.6.1
-
Fixed deadlock in
daily_file_sink
that happened while cleaning older files. Thanks @IIFE for reporting(#1570) and for fixing(#1571). -
Fixed
ringbuffer_sink::last_raw()
andringbuffer_sink::last_formatted()
that didn't return latest elements. Thanks @vekkuli for reporting and fixing (#1563). -
Fixed missing symbol
wstr_to_utf8buf(..)
in windows dll build. Thanks @haquocviet for reporting (#1569). -
Bumped bundled
fmt
to version 6.2.1.