Skip to content

v12.0.0

Latest

Choose a tag to compare

@odygrd odygrd released this 13 Jun 13:28
c338c6c

This release introduces asynchronous metrics, broadens codec coverage, and adds API and reliability improvements across backend lifecycle handling, sinks, and platform-specific paths.

Quill can now offload both logs and metric samples through the same backend worker, with metric metadata registered up front and each publish call enqueueing only a compact, fixed-size sample record on the hot path.

  • Added asynchronous metrics support, including metric registration APIs, Logger::publish_metric(), the METRIC(...) macro, and backend sink delivery through Sink::write_metric().
  • Added an optional PrometheusSink and examples for both a custom metric sink and Prometheus-backed export: custom metric sink example, Prometheus sink example
  • Added per-thread mapped diagnostic context (MDC) support with Logger::set_mdc(), Logger::erase_mdc(), Logger::clear_mdc(), the %(mdc) pattern attribute, and BackendOptions::mdc_format_pattern for global MDC rendering.
  • Added std codec support for std::variant, std::bitset, std::complex, and std::error_code.
  • Extended quill/std/Chrono.h codec support to match bundled fmt's C++20 calendar formatters, including std::chrono::year, month, day, weekday, and year_month_day when available.
  • Added C++20 module support groundwork, including export markers and macro cleanup.
  • Switched to native file handles (CreateFile/WriteFile) on Windows for improved write throughput compared to FILE*.
  • Added strict Frontend::create_sink() and Frontend::create_logger() APIs for callers that want duplicate names to fail instead of reusing existing objects.
  • Added CsvWriter::close() for deterministic logger removal and file closure before backend shutdown.
  • Added BackendOptions::ensure_monotonic_output_timestamps to correct regular log and metric output timestamps that would otherwise move backwards. Backtrace records keep their original capture timestamps.
  • BackendOptions::cpu_affinity now supports pinning the backend to multiple CPUs.
  • Added a fallback to fs::absolute when fs::canonical fails on RAM disks. (#910)
  • Hardened backend, signal-handler, manual-backend, and teardown paths with more robust startup and shutdown behavior.
  • Fixed multiple codec, sink rotation, named-argument, queue, and platform-specific edge cases.
  • Fixed an infinite loop in the backend when the user-provided error_notifier throws. (#915)
  • Generated a Doxygen tag file for downstream documentation linking. (#914)
  • Fix rotating sink reopen failure when the disk is full (#919)
  • Fixes DLL unload on Windows, drain remaining log messages in stop() when backend thread was terminated externally (#925)
  • Fixed stale named arguments from a pooled TransitEvent. The named_args pointer is now consistently nullptr for log statements without named arguments instead of occasionally being an empty vector (#926)
  • StopWatch now samples its elapsed time on the frontend at the log call site instead of when the backend formats the message, so logged values no longer include backend latency.
  • RotatingFileSink in append mode now counts rotated files left behind by previous runs towards max_backup_files for all RotationNamingScheme values, removing the oldest files on startup when they exceed the limit instead of letting them accumulate across restarts. Previously only the Index scheme (and the Date scheme for same-day files) recovered existing files, so Date and DateAndTime files from earlier runs were never cleaned up. Recovered append-mode files are not removed when overwrite_rolled_files is set to false. (#930)