Skip to content

v7.0.0

Compare
Choose a tag to compare
@odygrd odygrd released this 05 Sep 22:50
· 93 commits to master since this release
  • Simplified the log tags API. The Tags class has been removed. You now pass a char const* directly to the macros.
    Additionally, macros previously named WITH_TAGS have been renamed to _TAGS. For example, LOG_INFO_WITH_TAGS is
    now LOG_INFO_TAGS.

  • Renamed backend_cpu_affinity to cpu_affinity in BackendOptions to improve consistency.

  • Simplified project structure by removing the extra quill directory and made minor CMake improvements; include/quill is now directly in the root.

  • Added support for std::string with custom allocator. (#524)

  • Added a new log level NOTICE, for capturing significant events that aren't errors or warnings. It fits between INFO and WARNING for logging important runtime events that require attention. (#526)

  • Enhanced static assert error message for unsupported codecs, providing clearer guidance for STL and user-defined types.

  • Improved frontend performance by caching the ThreadContext pointer in Logger class to avoid repeated function calls. On Linux, this is now further optimised with __thread for thread-local storage, while other platforms still use thread_local.

  • Minor performance enhancement in the frontend by replacing std::vector<size_t> with an InlinedVector<uint32_t, 12> for caching sizes (e.g. string arguments).

  • Fixed order of evaluation for Codec::pair<T1,T2>::compute_encoded_size() to prevent side effects observed on MSVC

  • Introduced the add_metadata_to_multi_line_logs option in PatternFormatter. This option, now enabled by default, appends metadata such as timestamps and log levels to every line of multiline log entries, ensuring consistent log output. To restore the previous behavior, set this option to false when creating a Logger using Frontend::create_or_get_logger(...). Note that this option is ignored when logging JSON using named arguments in the format message. (#534)

  • JSON sinks now automatically remove any \n characters from format messages, ensuring the emission of valid JSON messages even when \n is present in the format.

  • Replaced static variables with static constexpr in the ConsoleColours class.

  • Fixed compiler errors in a few rarely used macros. Added a comprehensive test for all macros to prevent similar issues in the future.

  • Expanded terminal list for color detection in console applications on Linux

  • Fixed an issue where char* and char[] types could be incorrectly selected by the Codec template in Array.h

  • The library no longer defines __STDC_WANT_LIB_EXT1__, as the bounds-checking functions from the extensions are no longer needed.

  • StringFromTime constructor no longer relies on the system's current time, improving performance in simulations where timestamps differ from system time. (#541)

  • The Frontend::create_or_get_logger(...) function now accepts a PatternFormatterOptions parameter, simplifying the API. This is a breaking change. To migrate quickly, wrap the existing formatting parameters in a PatternFormatterOptions object.

    Before:

      quill::Logger* logger =
        quill::Frontend::create_or_get_logger("root", std::move(file_sink),
                                              "%(time) [%(thread_id)] %(short_source_location:<28) "
                                              "LOG_%(log_level:<9) %(logger:<12) %(message)",
                                              "%H:%M:%S.%Qns", quill::Timezone::GmtTime);

    After:

      quill::Logger* logger =
        quill::Frontend::create_or_get_logger("root", std::move(file_sink), quill::PatternFormatterOptions {
                                              "%(time) [%(thread_id)] %(short_source_location:<28) "
                                              "LOG_%(log_level:<9) %(logger:<12) %(message)",
                                              "%H:%M:%S.%Qns", quill::Timezone::GmtTime});