Repository navigation
v5.0.0
-
Fix build failure on Windows Arm64 (#485)
-
Previously, wide string support was included in
Codec.h. Wide string functionality has now been moved to a separate header file,WideStrings.h. On Windows, logging wide strings now requires the inclusion ofquill/std/WideStrings.h. -
Added
QUILL_IMMEDIATE_FLUSHpreprocessor variable. This variable can be defined before includingLogMacros.hor passed as a compiler flag. WhenQUILL_IMMEDIATE_FLUSHis defined, the library will flush the log on each log statement. This causes the caller thread to wait for the log to be processed and written to the log file by the backend thread before continuing, significantly impacting performance. This feature is useful for debugging the application when synchronized logs are required. (#488) -
Introduced
log_level_descriptionsandlog_level_short_codesinBackendOptionsto allow customization ofLogLeveldescriptions and short codes, replacing previously hardcoded values. This enhancement enables users to define their own descriptions and short codes for each log level. For instance, instead of displayingLOG_WARNING, it can now be configured to showLOG_WARN. (#489)quill::BackendOptions backend_options; backend_options.log_level_descriptions[static_cast<uint32_t>(quill::LogLevel::Warning)] = "WARN"; quill::Backend::start(backend_options);
-
Introduced
LOGV_LEVEL,LOGV_LEVEL_LIMIT, andLOGV_LEVEL_WITH_TAGSmacros. These new macros simplify logging by automatically printing variable names and values without explicitly specifying each variable name or using{}placeholders in the format string. Each macro can handle up to 26 arguments. The format string is concatenated at compile time, there is no runtime overhead for using these macros. For example:int a = 123; double b = 3.17; LOGV_INFO(logger, "A message with two variables", a, b)
outputs
A message with two variables [a: 123, b: 3.17] -
Introduced
LOGJ_LEVEL,LOGJ_LEVEL_LIMIT, andLOGJ_LEVEL_WITH_TAGSmacros. These new macros simplify JSON logging by automatically embedding the name of each passed variable as a named argument in the format string. Each macro can handle up to 26 arguments. The format string is concatenated at compile time, there is no runtime overhead for using these macros. For example:int var_a = 123; std::string var_b = "test"; LOGJ_INFO(logger, "A json message", var_a, var_b);
outputs
{"log_level":"INFO","message":"A json message {var_a}, {var_b}","var_a":"123","var_b":"test"} -
Enhanced the
filterfunction to also receive the formattedlog_messagealongside the log_statement, enabling the comparison and filtering oflog_messagewhile disregarding elements like timestamps from the fulllog_statement. (#493) -
Renamed
log_messagetolog_statementandshould_log_messagetoshould_log_statementinLogger -
Replaced
%(log_level_id)with%(log_level_short_code)in thePatternFormatter. -
Fix a
CMakeListserror for oldCMakeversions prior to3.19. (#491)