- Added
Filters
. The filter class can be used for filtering log records. Filters can be added to handler instances. See example_filters.cpp (#49) - Timestamp formatting optimisation for the backend worker thread.
- Free list allocator optimisation for the backend worker thread.
- PatternFormatter enhancement. It is now possible to pass {fmt} string syntax to
QUILL_STRING
. The default PatternFormatter string has been changed to:"%(ascii_time) [%(thread)] %(fileline:<28) LOG_%(level_name) %(logger_name:<12) - %(message)"
. This results to the following log being properly aligned despite the different lengths of each filename and logger name.
22:31:07.995438465 [2666041] file1.h:11 LOG_INFO logger1 - Log from file.
22:31:07.995445699 [2666041] long_file2.h:11 LOG_INFO logger_fl2 - Log from other file.
22:31:07.995457144 [2666041] a_longer_file_3.hpp:11 LOG_INFO logger_fl2_l - Log from other file.
22:31:07.995462471 [2666041] example_trivial.cpp:30 LOG_TRACE_L3 root - This is a log trace l3 example 1
- Do not force
quill
to always build asstatic
library in cmake. - Minor fix when
quill
is compiled with no exceptions. - Add the option to disable the non prefixed macro definitions if
QUILL_DISABLE_NON_PREFIXED_MACROS
is defined. (#40)
- Added support for printing colour codes in the terminal. See ConsoleHandler
- RotatingFileHandler improvements and minor change in API. See RotatingFileHandler
- DailyFileHandler is removed and replaced by TimeRotatingFileHandler. See TimeRotatingFileHandler
- Added backtrace logging. Log messages can be stored in a buffer and flushed later on demand. See Backtrace Logging
- Added bundled
doctest
2.4.0
- Migrated all tests from
gtest
todoctest
. - Upgraded bundled libfmt to
7.0.3
- Upgraded bundled libfmt to
7.0.2
- Fixed compile error with libfmt versions >
7.0.0
- Add a CMake option
QUILL_USE_BOUNDED_QUEUE
for bounded queue. - Fixed a clang 10 warning
- Fixed MinGw build
- Minor CMake fixes when
QUILL_FMT_EXTERNAL
option is used.
New Features
- Added option
QUILL_NO_EXCEPTIONS
to disable exceptions, std::abort() is called instead of an expection. (#16) - Exceptions thrown in the backend worker thread, will now call a user provided error handler callback to handle the error. (#21)
- Compile time checks for unsafe to copy user defined types. Non trivial user defined types must be explicitly tagged as safe to copy with the use of
QUILL_COPY_LOGGABLE;
. Otherwise they have to be formatted and passed as a string to the logger by the user. The old unsafe mode is still usable by#define QUILL_MODE_UNSAFE
(#20) - Added
QUILL_USE_BOUNDED_QUEUE
. In this mode no new queues get allocated but instead log messages get lost. Number of lost messages is reported to stderr. - Minor hot path optimisation. The pointer to the metadata for each log message is no logger copied to the queue but passed as a template argument instead.
- Added a latency benchmark, easily extendable for any logger
Improvements/Fixes
QUILL_RDTSC_CLOCK
option is replaced byQUILL_CHRONO_CLOCK
which is by OFF by default.- Improve compiler error message when trying to log a non copy constructible user defined type
- Fix buffer reallocation bug on TimestampFormatter. In previous versions any timestamp format set to 'set_pattern' expanding to a string longer than 32 bytes would cause a crash. (#24)
- The backend logging thread will now copy all messages from the SPSC queue to a local priority queue. This keeps the SPSC less empty avoiding a potential allocation on the hot path.
std::string_view
is now promoted tostd::string
to take a deep copy- The queue capacity has been moved from
config
toTweakme.h
. - Multiple formats patterns support for
stdout
andstderr
handlers. See example_stdout_multiple_formatters.cpp quill::start()
will now block until the backend worker has started.- Upgraded bundled libfmt to
6.2.1
- CMake changes to support package installation in conan.
- Support for
arm/arm64
. (#19) - Add a cmake option
QUILL_ENABLE_INSTALL
to enable cpack.
- Improved
QUILL_RDTSC_CLOCK
tweak option. It is now possible to switch between usingrdtsc
orstd::chrono
clock without having to recompile quill as library.
- Linking and including an external version of
fmt
is now supported. SeeTweakMe.h
- Fixed compiler warnings when using clang's
-Wdocumentation
. (#12) - Fixed a bug that wouldn't report a compile-time error for invalid format strings. (#13)
- Added process ID to Formatter. (#14)
- Enhanced timestamp formatting. The
timestamp_format
string passed inhandler->set_pattern(format_pattern, timestamp_format, timezone)
now accepts three additional specifiers%Qms
,%Qus
,%Qus
that can be used to format the fractional seconds. See here. (#15)
- Daily file handler. The file handler rollover every 24 hours
- Rotating file handler. The file handler will rollover based on the size of the file
- MinGW compatibility
- Added a CMake option
QUILL_VERBOSE_MAKEFILE
. Building Quill as a master project now defaults to non verbose makefile output unless-DQUILL_VERBOSE_MAKEFILE=ON
is passed to CMake. (#6) - Flush policy improvement. Previously Quill backend worker thread would never
flush
. This made watching the live log of the application harder because the user has to wait for the operating system to flush orquill::flush()
had to be called on the caller threads. This has now been fixed, when the backend thread worker has no more log messages to process it will automaticallyflush
. (#8) - The log level names have been changed from
"LOG_INFO"
,"LOG_DEBUG"
, etc to"INFO"
,"DEBUG"
, etc .. The default formatter string is now using"LOG_"%(level_name)
instead of%(level_name)
therefore there is now change in the behaviour. This change gives a lot of more flexibility to users who prefer to see e.g.INFO
instead ofLOG_INFO
in the logs. (#7) - An option has been added to append the date to the filename when using a FileHandler
quill::file_handler(filename, mode, FilenameAppend);
. (#7) - It is now possible to specify the timezone of each handler timestamp. A new parameter is added to
file_handler->set_pattern(...)
. SeePatternFormatter::Timezone
. (#7) - Rename
emit
as it can confict with Qt macros. (#4) - Upgraded
libfmt
to6.2.0
.
- Initial release.
- Using
libfmt
to6.1.2
.