Skip to content

Releases: gabime/spdlog

Version 1.8.4

25 Mar 18:38
012fe99
Compare
Choose a tag to compare
Version 1.8.4 Pre-release
Pre-release

Remove version requirement from find_package when searching external fmt. #1890. Thanks @prince-chrismc

Version 1.8.3

24 Mar 20:37
53e1c9a
Compare
Choose a tag to compare
  • 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 when SPDLOG_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

11 Dec 14:56
Compare
Choose a tag to compare
  • 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

30 Sep 14:54
Compare
Choose a tag to compare

Version 1.8.0

01 Sep 10:05
Compare
Choose a tag to compare
  • 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() and should_log() functions to the spdlog:: 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

09 Jul 17:45
616caa5
Compare
Choose a tag to compare

Version 1.6.1

26 May 21:43
Compare
Choose a tag to compare
  • 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() and ringbuffer_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.

Version 1.6.0

15 May 13:18
83b9149
Compare
Choose a tag to compare

What'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);

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 of map 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 like hexdump. 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).

Version 1.5.0

13 Jan 19:26
cf6f1dd
Compare
Choose a tag to compare

New features

  • Added ringbuffer sink. Thanks @eudoxos (#1307).
  • Auto create the required logging directories if they do not exist (9b7812a).
  • Update bundled fmt to version 6.1.2.
  • Added the optional ! 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 of spdlog/.* 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 .

Version 1.4.2

08 Oct 12:43
Compare
Choose a tag to compare

Fix 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.