All Versions
Latest Version
Avg Release Cycle
58 days
Latest Release
79 days ago

Changelog History
Page 1

  • v1.5.0

    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 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 .
  • v1.4.2

    October 08, 2019

    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.
  • v1.4.1

    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

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

    • πŸ‘ Systemd support. Thanks @WarShoe (#1027)

    • πŸ‘Œ 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

  • v1.3.1

    January 18, 2019

    πŸ›  Fix few issues found by 1.3.0 users:

    • πŸ›  Fix google benchmark link error when compiling the bechmarks. Thanks @myd7349 (#961, f4c737e)
    • Fix spdlog not printing message if SPDLOG_NO_THREAD_ID is defined. Thanks @scribam (#970, f4c737e)
    • πŸ›  Fix depending on the order of inclusion of spdlog.h. Thanks @gocarlos (#959, 23fdc0e)
  • v1.3.0

    January 11, 2019

    πŸ‘Œ Improvements

    Upgraded to the latest and greatest fmt library version 5.3.0.

    0️⃣ New API for default logger spdlog::trace(..), spdlog::debug(..), spdlog::info(..), etc.
    0️⃣ For convenience, spdlog now creates a default global logger (to stdout, colored and multithreaded).
    It can be used easily by calling spdlog::info(..), spdlog::debug(..), etc directly without any preparations.

    It's instance can be replaced to any other logger (shared_ptr):

    spdlog::set\_default\_logger(some\_other\_logger);spdlog::info("Use the new default logger");

    Alignment support in log patterns.
    Each pattern flag can be aligned by prepending a width number(upto 128).
    πŸ‘‰ Use-(left align) or = (center align) to control the align side:

    align meaning example result
    %<width><flag> Align to the right %8l "    info"
    %-<width><flag> Align to the left %-8l "info    "
    %=<width><flag> Align to the center %=8l "  info  "

    Support for logging source filename , line number , and function name (thanks @possiblyhuman for contributing to this effort)

    flag meaning example
    %@ Source file and line (use SPDLOG_TRACE(..),SPDLOG_INFO(...) etc.) my_file.cpp:123
    %s Source file (use SPDLOG_TRACE(..),SPDLOG_INFO(...) etc.) my_file.cpp
    %# Source line (use SPDLOG_TRACE(..),SPDLOG_INFO(...) etc.) 123
    %! Source function (use SPDLOG_TRACE(..),SPDLOG_INFO(...) etc. see tweakme for pretty-print) my_func

    Support for compile time check of log levels using #define SPDLOG_ACTIVE_LEVEL <level>.
    🌲 Use LOG_TRACE(..), LOG_DEBUG(..), LOG_INFO(..), etc. to enable.
    🌲 Those macros check at compile time the log level and translate to empty statement if the log level is not high enough. Even if a log macro evaluate to a log call, the macro will check at runtime the level before evaluating its arguments.
    So for example the following won't evaluate some_costly_function() because the logger's level is error:

    #define SPDLOG\_ACTIVE\_LEVEL SPDLOG\_LEVEL\_DEBUG #include "spdlog/spdlog.h" .. spdlog::set\_level(error); SPDLOG\_DEBUG("Some costly arg: {}", some\_costly\_function());

    CMake improvements. Thanks @dpacbach (85b4d7c, f5dc166 ).

    🐎 Numerous small performance optimizations.

    Global option that disables global registration of loggers set_automatic_registration(bool). Thanks @pabloariasal (#892).

    ⚑️ Optimize logging of C strings by using string_view to avoid unnecessary copy. Thanks @peergynt (cb71fea).

    βœ… Use google benchmark to test latencies.

    πŸ›  Fixes

    • logger::error_handler() should be const (#881, thanks @shoreadmin for reporting)
    • Cleanup header file: remove log_msg.h include from fmt_helper.h. Thanks @peergynt (1b391cc)
    • πŸ›  Fix log_msg constructor doesn't initialize all fields (#888. Thanks @curiouserrandy for reporting).
    • 🌲 Change log_msg&& to log_msg& params. Thanks @rwen2012 (794a636)
    • πŸ›  Fix typo in Android example. Thanks @ZaMaZaN4iK (f5a2725)
    • πŸ›  Fix Compiling error VS2017 #902 (Thanks @JaNurz for reprting).
    • πŸ›  Fix thread id is prefixed with zeros #908 (Thanks @klrakiranpradeep for reporting).
    • πŸ›  Fix OSX build. Thanks @DanielChabrowski (c7f42d1).
    • πŸ›  Fix and optimize usage of fmt::internal::count_digits(..) for better support 32/64 bits. Thanks @DanielChabrowski (c7f42d1, f1ab6fe).
    • πŸ‘ Better handling of rotation errors (b64e446).
    • πŸ›  Fix exceptions on file size calculation on Windows XP x64 and Windows Server 2003 x64. Thanks @lestera (#926).
    • 0️⃣ Do not attempt to default operator= when it is implicitly deleted. Thanks @dpacbach (63a475d).
    • πŸ‘‰ Make an implicit cast from int --> uint32_t explicit. Thanks @dpacbach (a6152eb).
    • βœ… Enable testing in the Travis config file. Thanks @dpacbach (f5dc166).
    • πŸ›  Fix the text alignment in the example. Thanks @bzindovic (d6086da4856df510657ffe4ef6b894e902b4b83).
    • πŸ›  Fix typos. Thanks @peergynt (ce8cf1e).
    • πŸ›  Fix handling of external fmt lib in cmake. Thanks @cneumann (084bc72).
    • πŸ›  Fix VC WinRT compilation. Thanks @taniey for reporting (@948).
    • πŸ›  Fix typo in file_helper.h. Thanks @brridder (fb702f9).
  • v1.2.1

    October 17, 2018

    πŸ›  This fixes a compilation error of dist_sink.h (#864) . Thanks @DimRochette !

  • v1.2.0

    October 07, 2018

    πŸ‘Œ Improvements

    • ⬆️ Upgraded to latest fmt version 5.2.1.
    • Binary data logging using spdlog::to_hex(binary_data). Many types of std::container<char> can be logged in hex. See usage examples.
    • βž• Added logger->clone() to ease the creation of new loggers from an existing one.
    • Numerous micro optimizations across the lib.
    • Added set_sinks method to dist_sink for atomic updating set of sinks in dist_sink. Thanks @jwnimmer-tri .
    • πŸ‘Œ Improved CmakeLists.txt to better handle third-party usage. Thanks @taketwo .

    πŸ›  Fixes

    • πŸ›  Fixed wchar logging (supported only in windows. #851 , #764).
    • πŸ›  Fixed registry test. Thanks @DanielChabrowski .
    • βœ‚ Removed invalid files from tests.sln. Thanks @yhchen .
    • πŸ›  Some fixes to console_globals.h includes. Thanks @DanielChabrowski
    • 🏁 Don't deny access to log files from other processes under windows. Thanks @eruiz.
    • 🚚 Pessimizing move remove. Thanks @maciekgajewski
    • ansicolor_sink.h - add missing sink include. Thanks @AlexanderDalshov .
    • πŸ‘Œ Improved rotating sink error handling.
    • πŸ›  Fixed Readme. Thanks @blackball .
    • πŸ›  Fixed some clang tidy warnings.
  • v1.1.0

    August 15, 2018

    πŸ› Bug fixes

    • πŸ›  Fixed android sink compilation. Thanks @rajesh-p .
    • πŸ›  Fixed race condition in async-factory.
    • πŸ›  Fixed bug in spdlog_ex implementation .Thanks @gajanak for reporting.
    • πŸ›  Fixed race condition in the unit tests.
    • πŸ›  Fixed compiler warnings under OSX. Thanks @baishuai .

    πŸ‘Œ Improvements

    • Some micro optimizations.
    • πŸ‘Œ Improve and fix CMake issues. Thanks @DanielChabrowski .
    • πŸ‘Œ Improve and fix travis-ci issues. Thanks @DanielChabrowski .
    • Added overrun_counter() to the async thread pool queue - returns # of messages overrun under the overrun_oldest mode. Thanks @indiosmo .
    • πŸ›  Fixed some clang tidy warnings.
  • v1.0.0

    August 05, 2018

    Version 1.0.0 is a major release with numerous features and improvements.
    πŸ‘€ It contains some breaking API changes that are not compatible with 0.x versions (see below).


    Include what you need : Reduce compilation times by including only the minimum required. Users can now to include only the actual sinks/features they need from spdlog/sinks folder.

    Upgrade to fmt lib version 5.1 - thanks @vitaut for this great lib.

    πŸ‘Œ Support for custom formatting per sink - each sink can have it's own formatting and level using sink->set_pattern(..) or sink->set_formatter(..).

    🌲 async logging - thread pool - async loggers now share a global thread pool by default.
    πŸ‘· Creating and destroying async loggers is cheap now. This is in contrast to previous versions were creating async loggers was expensive, since each logger instance had its own worker thread and queue.
    The global thread pool and can be configured using spdlog::init_thread_pool(queue_size, worker_threads) or created directly using make_shared.

    periodic flusher : spdlog::flush_every(seconds) to periodically flush all registered loggers.

    πŸ‘Œ Improved performance - by caching some recently used values in the pattern formatter.

    Ability to add sinks to a logger after its creation (but it is not thread safe to do so - so use with caution).

    πŸ’₯ Breaking changes

    Include what you need. For example to use basic_logger add #include "spdlog/sinks/basic_file_sink.h" (see example in readme).

    To use async loggers - include "spdlog/async.h"

    Replaced set_async_mode(..) with factory template. For example:

     auto logger= spdlog::rotating\_logger\_mt\<spdlog::async\_factory\>(...);

    βœ‚ Removed printf support.

    βœ‚ Removed warmup/teardown functions from async.

    Custom sinks inheriting from sinks::base_sink need to format (if needed) the message before sending to their target. For example

    void sink\_it\_(const details::log\_msg &msg) override{ fmt::memory\_buffer formatted; sink::formatter\_-\>format(msg, formatted); // sink the formatted ... }

    βž• Added clone() virtual function to the formatter interface.

    Removed support for #define SPDLOG_NO_REGISTRY_MUTEX

    πŸ”„ Change log

    πŸ‘€ See here the complete list of changes.