Changelog History
Page 1
-
v2.4.2 Changes
๐ Fixes
- ๐ Fixes an assertion that was triggered in debug mode due to changes in v2.4.1
-
v2.4.1 Changes
๐ Improvements
- ๐ท Previously the backend worker thread would read all the log messages from the queue but not read the log messages when the buffer had wrapped around. It will now read all the messages.
- Removed the
min_available_bytes
cache from the SPSC queue as an optimisation. It is not needed anymore as we now read all messages at once instead of reading message by message.
-
v2.4.0 Changes
๐ Improvements
Added a config option
backend_thread_strict_log_timestamp_order
. This option enables an extra timestamp check on the backend logging thread when each message is popped from the queues. It prevents a rare situation where log messages from different threads could appear in the log file in the wrong order. This flag is now enabled by default.Added a config option
backend_thread_empty_all_queues_before_exit
. This option makes the backend logging thread to wait until all the queues are empty before exiting. This ensures no log messages are lost when the application exists. This flag is now enabled by default.
-
v2.3.4 Changes
๐ Improvements
- ๐ฒ Optimise the backend logging thread to read multiple log messages from the same queue, but still fairly read each queue from all active threads.
-
v2.3.3 Changes
๐ Fixes
- ๐ฒ Previously when multiple threads were logging, Quill backend logging thread would first try reading the log messages of one thread until the queue was completely empty before reading the log messages of the next thread. When one of the threads was logging a lot, it could result in only displaying the log of that thread, hiding the logs of the other threads. This has now been fixed and all log messages from all threads are read fairly.
-
v2.3.2 Changes
๐ Fixes
- ๐ Fix code not compiling with treat warnings as errors set on Windows. (#198)
-
v2.3.1 Changes
๐ Fixes
- ๐ Optimise logging queue cache alignment of variables. It seems that v2.3.0 made the hot path slower by ~5 ns per message. This has been fixed in this version and the performance is now the same as in the previous versions.
-
v2.3.0 Changes
๐ Improvements
๐ Cache the available bytes for reading in the logging queue. This is meant to offer some minor performance improvement to the backend logging thread. #185
๐ Fixed static code analysis and clang '-Wdocumentation' warnings.
๐ The
Handler.h
API has changed in this version to support structured logs. If you have implemented your own customHandler
you will have to change it to follow the new API.๐ This version adds support for writing structured logs. Structured logs provide easier search through events. Structured logging is automatically enabled when named arguments are provided to the format string. Structured logs are only supported by the new
quill::JsonFileHandler
handler. The already existingFileHandler
andConsoleHandler
are compatible with named arguments, but they will ignore them and output the log in its original format, as defined by the pattern formatter. Structured logs are not supported for wide characters at the moment. See example_json_structured_log.cpp
For example :
quill::start(); quill::Handler* json_handler = quill::create_handler<quill::JsonFileHandler>("json_output.log", "w"); // create another logger tha logs e.g. to stdout and to the json file at the same time quill::Logger* logger = quill::create_logger("dual_logger", {quill::stdout_handler(), json_handler}); for (int i = 2; i < 4; ++i) { LOG_INFO(logger, "{method} to {endpoint} took {elapsed} ms", "POST", "http://", 10 * i); }
1) Will write to stdout (stdout_handler) :
23:37:19.850432433 [11811] example_json_structured_log.cpp:39 LOG_INFO dual_logger - POST to http:// took 20 ms 23:37:19.850440154 [11811] example_json_structured_log.cpp:39 LOG_INFO dual_logger - POST to http:// took 30 ms
2) Will produce a JSON file (json_handler) :
{ "timestamp": "23:37:19.850432433", "file": "example_json_structured_log.cpp", "line": "39", "thread_id": "11811", "logger": "dual_logger", "level": "Info", "message": "{method} to {endpoint} took {elapsed} ms", "method": "POST", "endpoint": "http://", "elapsed": "20" } { "timestamp": "23:37:19.850440154", "file": "example_json_structured_log.cpp", "line": "39", "thread_id": "11811", "logger": "dual_logger", "level": "Info", "message": "{method} to {endpoint} took {elapsed} ms", "method": "POST", "endpoint": "http://", "elapsed": "30" }
-
v2.2.0 Changes
๐ Improvements
- ๐ง Previously storing the default root logger by calling
quill::get_logger()
followed byquill::configure(cfg)
would invalidate the pointer to the default root logger returned by the former function. This has now been fixed and the obtainedLogger*
pointer is still valid. - Disable
fmt::streamed()
. (#189) - โก๏ธ Update bundled fmt to 9.1.0
- ๐
logger->should_log(level)
is removed. A compile time check was added tologger->should_log<level>()
. (#187)
- ๐ง Previously storing the default root logger by calling
-
v2.1.1 Changes
๐ Improvements
- ๐ง Previously storing the default root logger by calling
quill::get_logger()
followed byquill::configure(cfg)
would invalidate the pointer to the default root logger returned by the former function. This has now been fixed and the obtainedLogger*
pointer is still valid.
- ๐ง Previously storing the default root logger by calling