Changelog History
Page 1
-
v1.8.1 Changes
September 30, 2020- 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).
- Fixed
-
v1.8.0 Changes
September 01, 2020- 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
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).
-
v1.7.0 Changes
July 09, 2020- π 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).
-
v1.6.1 Changes
May 26, 2020Fixed 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. -
v1.6.0 Changes
May 15, 2020What's new
π² Load log levels from environment variable
SPDLOG_LEVEL
:include "spdlog/cfg/env.h"...spdlog::cfg::load_env_levels();
$ # set log level to debug$ SPDLOG_LEVEL=debug && ./example$ # set to info except for mylogger which is set to trace:$ SPDLOG_LEVEL=info,mylogger=trace && ./example$ # turn off all logging except for mylogger which is set to debug::$ SPDLOG_LEVEL=off,mylogger=debug && ./example
π² Load log levels from
argv
(e.g../example SPDLOG_LEVEL=debug
):include "spdlog/cfg/argv.h"...spdlog::cfg::load_argv_levels(argc, argv);
New windows eventlog sink . Thanks @ban-dana (#1418).
π New tcp sink that sends log messages in tcp to a remote server. Thanks @Proheeler (#1426).
π Extend spdlog with your own flags in the log pattern. See wiki for details.
π Support for building spdlog as dll under windows. Thanks vejmartin (#1467, 3b73278, 5b3a183).
β¬οΈ Bump the bundled fmt version to 6.2.0 .
π Fixes and Improvements
Prevent race condition when SPDLOG_PREVENT_CHILD_FD is defined. Thanks @dominicpoeschko (#1423).
π Fix race condition in the
filename()
function in the file sinks. Thanks @tt4g (#1430, #1431).Fix
ansicolor_sink::set_color(..)
- can cause memory violation if user provides a custom color code that points to stack memory (#1540, 0b36d4e). Thanks @caizongchao for reporting.π Fix potential buffer overflow in color_sinks if creating multiple color sinks in the same logger and one of them has a pattern without color flags (#1452, 64de880). Thanks @dominicpoeschko for reporting.
β‘οΈ Optimize cases when string_view is passed to the logger to avoid unnecessary fmt::format. Thanks dominicpoeschko (#1424) .
π Support for max files in daily logger - delete oldest files after creating the daily file. Thanks @ruoshui1314 (#1394).
π Fix deprecated warning with C++14 and external fmt lib (#1439). Thanks @ClausKlein for reporting.
β‘οΈ Optimize colos sinks to use
std::array
instead ofmap
to find color codes (695912c, 4b7c059). Thanks @qis for the suggestion.π Fix Win32 event log sink compilation. Thanks @Crunkle (#1444).
π Don't include
windows.h
in common.h. Thanks @ghost (#1453).π Resolve erroneous clang-tidy warning about using a moved from pointer. Thanks @Ruffel (#1457).
π Fixed numerous clang-tidy warnings.
β Added options to
to_hex
to output hex likehexdump
. Thanks @ngugcx (#1472).π Fix Windows setenv check. Thanks @Crunkle (#1475).
Removed the 'SPDLOG_NO_NAME` macro in tweakme.h and cmake.
β Added a forward declaration header
spdlog\fwd.h
. Thanks @horenmar for the suggestion (#1481).π Moved
throw
to dedicated function to optimize compile-time and runtime-performance. Thanks @horenmar for the suggestion (#1483).Fix a build issue when SPDLOG_PREVENT_CHILD_FD is defined. Thanks @Naios (#1487).
π Fix issue with using external fmt (#1480). Thanks @nalinigans for reporting.
π Minor performance optimizations in pattern formatter (ca9c83f, 76389e0, 7766bc2, d38bd13)
π Fixed on Android compilation #1527. Thanks @Bizyroth for reporting.
β Add log function to the logger API to allow logging with custom timepoint. #1521 - Thanks @ron003 .
π Fix missing exported symbol when building spdlog.dll in windows (#1535, 348c438). Thanks @plmzod for reporting.
β¬οΈ Dropped meson support.
π Fix typos and tabs in the code. Thanks @waywardmonkeys (#1536) .
CMake: Fix GNUInstallDirs include location Thanks @vitlav (#1407).
βͺ CMake: workaround for
Unknown extension ".c" for file
issue . Thanks @niamster (#1442).π CMake: Support CPack RPM generation. Thanks @tcraigtyler (#1451).
π CMake: Disabled extra warnings generation by default. Use
SPDLOG_BUILD_WARNINGS=ON
to enable again. Thanks @Glamhoth (#1503 02802af, 6440733, 1f7f1c1)CMake: Support for precompiled headers with
SPDLOG_ENABLE_PCH
flag. Thanks @OlivierLDff (#1484).CMake: Add
/WX
MSVC compiler option for only if mscv compiler is used. Thanks @trondhe (#1495).CMake: Set minimum version of fmt to 5.3.0. Thanks @Montellese (#1525).
CMake: Fix tabs, whitespaces and eol. Thanks @waywardmonkeys (#1537).
π Tests: removed duplicate entry for count_lines(). Thanks @emmenlau (#1417).
β Tests: don't run spdlog-utests and spdlog-utests-ho in parallel. Thanks @tt4g (#1421).
β Tests: Enable running the tests against an installed copy of spdlog. Thanks @mr-c (#1422).
β Tests: Support empty SPDLOG_EOL. Thanks @emmenlau (#1414).
π¦ README: add conda as a supported package manager . Thanks @avrahamshukron (#1473).
π§ README: Replace
yaourt with
yay` pacakge manage for archlinux. Thanks @zyansheep (#1494). -
v1.5.0 Changes
January 13, 2020π New features
- β Added ringbuffer sink. Thanks @eudoxos (#1307).
- π² Auto create the required logging directories if they not exist (9b7812a).
- β‘οΈ Update bundled fmt to version 6.1.2.
- β Addded the
!
modifier to truncate the result if the field size exceeds the specified width (see wiki for details)
π Fixes and improvements
- π Fix build failure on clang 7 with libc++. Thanks @jktjkt (a03f9eb).
- π Fix some spelling errors. Thanks @flopp .
- π Fix - compilation when using external fmt library. Thanks @dvhwgumby for reporting (#1273).
- π Fix location of CMake config info. Thanks @dvhwgumby for reporting (#1274)
- π Fix missing include (9a68bd8).
- CMake code duplication improvement. Thanks @bencsikandrei (#1283)
- β CMake improvments in tests . Thanks @Andrei-Florin BENCSIK (2cc620e)
- β Remove unused variable. Thanks @masmullin2000 (#1285)
- Fix tests to Use _FILE_OFFSET_BITS=64 when building on Linux 32-bit systems. Thanks @yipdw (#1288).
- π Improve systemd journald support. Thanks @jktjkt (#1292).
- π Improve log macros. Thanks @pck (#1294).
- β Removed lazy argument evaluation from macros (#163).
- Some micro optimizations (79468cf, 3ee4f28, bf40855).
- π Correctly guard
SetHandleInformation
API call to better support compiling for UWP. Thanks @sylveon (#1296). - Exclude from compilation prevent_child_fd() if SPDLOG_PREVENT_CHILD_FD not defined (57085c8)
- CMake - Added tweakme options to CMakeLists.txt (18edb8b).
- Removed SPDLOG_NO_DATETIME option.
- π Fix meson tests build . Thanks vedranmiletic fore reporting (#1295, c081919, 4a4f13b, 436ce16).
- Use
#include" <spdlog/.*>
instead ofspdlog/.*
across the codebase. Thanks @RedDwarf69 (#1304). - π Fix struct tm doesn't have tm_gmtoff in ISO C. Thanks @lancesun (ff3e6c7, #1306)
- Always cache gmt offset (de2c07a).
- β‘οΈ Optimize
backtracer operator=
(255f7f2). - π Fix some clang-tidy warnings (93008b2, bff8572, 3999613).
- π Fix compiler error in os-inl.h min/max on Windows (#1302).
- β Remove redundant semicolon. Thanks @inhzus (#1311).
- π Fix compiler warnings. Thanks @0x8000-0000 (#1331).
- Fix missing include header in `spdlog/sinks/daily_file_sink.h. Thanks @afoolsbag for reporting (#1332).
- π Fix elapsed time larger than 6 digits ignores alignment width. Thanks @ivan236634452 for reporting (#1327).
- π Set version for shared library in meson build. Thanks @lgbaldoni (#1337).
- π Improved
dist_sink
ctor. Thanks @mmakhalaf for reporting (#1298). - Fix #1325. Added SPDLOG_FMT_EXTERNAL_HO option. Thanks @steffenb7333 for reporting.
- π Fix #1340 (missing include). Thanks @jeanga for reporting.
- π Fix compile on Win10 with Cygwin. Thanks @frfrankkopp and @tt4g (#1347).
- π Fixed #1348. Thanks @ficzerepeti for reporting.
- CMakeLists.txt allow overriding the cpp standard to higher than 11
- π Fix a small problem in the basic example. Thanks @mike239x (#1367).
- π Fix invalid meson option. Thanks @segfault-magnet (#1370).
- meson: add fallback to fmt dependency #1378. Thanks @idanko
- β‘οΈ Update docs: spdlog now available in conan center, bincrafters repo is deprecated #1387. Thanks @gocarlos .
-
v1.4.2 Changes
October 08, 2019Fix some issues discovered by users:
- Set additional CPACK variables for RPM generator (#1246). Thanks @tcraigtyler.
- Fix compile when
SPDLOG_WCHAR_FILENAMES
is defined (#1249 ). - π Fix
stdout color sink
under Windows to better handle cases when no console available (#1250). - π Fix windows compile error where std::max is overriden by a macro. (#1251, #1252). Thanks @bsergean.
- CMakeLists.txt: Moved the installed lib to
CMAKE_INSTALL_LIBDIR
(#1253). Thanks @DasRoteSkelett. - π CMakeLists.txt: Fixed pkg-config generation (cf2bf48, fb70eca). Thanks @SammyEnigma.
-
v1.4.1 Changes
September 23, 2019π Fix few issues discovered by users of 1.4.0
- β Added pkgconfig file to CMake install - Thanks @orbea for reporting and fixing (#1237 #1238).
- π Fix regression in wchar support under windows. Thanks @Bak-Jin-Hyeong for reporting and fixing (#1239 #1240).
- CMake: Do not install bundled fmt if SPDLOG_FMT_EXTERNAL is defined. Thanks @orbea (#1241).
-
v1.4.0 Changes
September 21, 2019π Improvements
spdlog can now be compiled as a static or shared lib (thanks @DavidZemon for the help).
Using the compiled lib improves greatly compile times when using spdlog and is very recommended.$ cd spdlog && mkdir build && cd build# Build is static lib (pass -DCMAKE_BUILD_TYPE=shared for building as shared lib)$ cmake .. && make -j
Upgraded to the latest and greatest fmt library version 6.0.0. Thanks @tgpfeiffer (and to @vitaut for fmt!).
Support for -fno-exceptions (disabled by default). Enabling this will replace all throw() statements in spdlog with std::abort(). To enable, pass
-DSPDLOG_NO_EXCEPTIONS=ON
to CMake before building spdlog.support for building spdlog with meson. Thanks @mensinda
π Backtrace support - store debug/trace messages in a ring buffer to display later on demand. Very useful (thanks @MathijsV for the idea):
spdlog::enable_backtrace(32); // create ring buffer with capacity of 32 messages// or my_logger->enable_backtrace(32)..for(int i = 0; i < 100; i++) { spdlog::debug("Backtrace message {}", i); // not logged yet.. }// e.g. if some error happened:spdlog::dump_backtrace(); // log them now! show the last 32 messages// or my_logger->dump_backtrace(32)..
π Support for cleaning old files in daily_logger.
π Numerous CMake build improvements. Thanks @DavidZemon , @jktjkt , @ksergey , @mnemotic , @cneumann , @dpacbach , @FrancoisChabot , @myd7349 , @matt77hias
π Better support for various Unix BSDs (DragonFly, NetBSD, FreeBSD, OpenBSD). Thanks @jbeich (#1234)
π Provide source location support for systemd sink. Thanks @jbelloncastro (#1122)
β Added fmt::(w)string_view support. Thanks @matt77hias (#1139)
β Add option to force color output without TTY . Thanks @psalz (#1175)
β Add more overloads to spdlog::log and spdlog::logger::log. Thanks @sylveon (@1169)
β Add public API spdlog::initialize_logger for create loggers manually. Thanks @tt4g (#1035)
Expose should_do_colors_ in ansicolor_sink.h. Thanks Florian WΓΆrter (#1022)
β Add tweak support for user short level names. Thanks @MFornander (#996)
β Add method to filesinks to return filename. Thanks @markniebur (#978)
rotating_sink: Add option to rotate on open. Thanks @pwm1234 (#958)
π Allow filename/line number at all levels. Add function name %! support. Thanks @possiblyhuman (#956)
New dups_filter sink -duplicate message removal sink. It will skip a message if previous one is identical and less than "max_skip_duration" old.
π New '%o', '%i', '%u', '%O' format flags - Display elapsed time in mills/micros/nanos/seconds since previous message.
π Some minor pattern formatter performance improvements.
π Fixes
- π Fix Wundef in os-inl.h. Thanks @AMS21 (#1189)
- π Fix use of old style cast in os-inl.h. Thanks @AMS21 (#1164)
- π Prevent NEAR and FAR macro definitions from leaking on Windows platforms. Thanks @PeterTh (#1142)
- π Fix syslog output. Thanks @mattiasj-axis (#1140)
- Fix
msg.time
in daily_file_sink. Thanks @s-shin (#1129) - Fix missing include for null_mutex in rotating_file_sink.h. Thanks @casperevan (#1120)
- π Fix warning: redundant move in return statement. Thanks @MarkKoester (#1119)
- π Fix use of incomplete type in stdout sinks. Thanks @DanielChabrowski (#1118)
- Fix deprecation warnings in filename_to_str and improve performance of wbuf_to_utf8buf. Thanks @sylveon (#1127)
- β‘οΈ Update README.md. Thanks @martinkrammer (#1057)
- β Remove extra semicolon. Thanks @Jerry-Ma (#1202)
- π Fix unexpected log macro expansion. Thanks @db-panda (#1055)
- Namespace qualify stat functions. Thanks @p-po (#1045)
- π Fix typo in Android logger. Thanks @romainthomas (#994)
- β Remove unnecessary log function. Thanks @DanielChabrowski (#988)
- π Allow custom formatter in sink's ctor. Thanks @DanielChabrowski (#986)
- π Fix shadowed parameter. Thanks @ZGCDDoo (#984)
- β‘οΈ Update log_msg.h. Thanks @scribam (#969)
- π Fix #benchmark link error. Thanks @myd7349 (#962)
- π Fix typo in file_helper.h. Thanks @brridder (#955)
-
v1.3.1 Changes
January 18, 2019π Fix few issues found by 1.3.0 users: