Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quill 5.0.0 #177249

Merged
merged 2 commits into from
Jul 13, 2024
Merged

quill 5.0.0 #177249

merged 2 commits into from
Jul 13, 2024

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
- Fix build failure on Windows Arm64 ([#485](https://github.com/odygrd/quill/issues/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 of quill/std/WideStrings.h.

  • Added QUILL_IMMEDIATE_FLUSH preprocessor variable. This variable can be defined before including LogMacros.h or passed as a compiler flag. When QUILL_IMMEDIATE_FLUSH is 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_descriptions and log_level_short_codes in BackendOptions to allow customization of LogLevel descriptions 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 displaying LOG_WARNING, it can now be configured to show LOG_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, and LOGV_LEVEL_WITH_TAGS macros. 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, and LOGJ_LEVEL_WITH_TAGS macros. 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 filter function to also receive the formatted log_message alongside the log_statement, enabling the comparison and filtering of log_message while disregarding elements like timestamps from the full log_statement. (#493)

  • Renamed log_message to log_statement and should_log_message to should_log_statement in Logger

  • Replaced %(log_level_id) with %(log_level_short_code) in the PatternFormatter.

  • Fix a CMakeLists error for old CMake versions prior to 3.19. (#491)

@github-actions github-actions bot added the bump-formula-pr PR was created using `brew bump-formula-pr` label Jul 13, 2024
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Jul 13, 2024
@BrewTestBot BrewTestBot added this pull request to the merge queue Jul 13, 2024
Merged via the queue into master with commit f70b178 Jul 13, 2024
14 checks passed
@BrewTestBot BrewTestBot deleted the bump-quill-5.0.0 branch July 13, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants