Skip to content

Commit

Permalink
Fix log level short code mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
odygrd authored Sep 13, 2024
1 parent e11d26e commit 1d57c47
Show file tree
Hide file tree
Showing 4 changed files with 278 additions and 136 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
enabled. ([#557](https://github.com/odygrd/quill/issues/557))
- Enhanced the queue allocation notification message for better readability. It now shows capacities in KiB, e.g.,
`20:59:25 Quill INFO: Allocated a new SPSC queue with a capacity of 1024 KB (previously 512 KB) from thread 31158`.
- Fixed incorrect log level short codes introduced in v7 after adding NOTICE. Using `%(log_level_short_code)` in the
formatter could incorrectly map `LOG_ERROR` to `"C"` and LOG_WARNING
to `"E"`. ([#564](https://github.com/odygrd/quill/issues/564))

## v7.1.0

Expand Down
4 changes: 2 additions & 2 deletions include/quill/backend/BackendOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ struct BackendOptions
* Provides short codes representing each log level for compact identification and usage.
* The indices correspond to LogLevel enum values defined elsewhere in the codebase.
*/
std::array<std::string, 11> log_level_short_codes = {"T3", "T2", "T1", "D", "I", "W",
"E", "C", "BT", "N", "DN"};
std::array<std::string, 12> log_level_short_codes = {"T3", "T2", "T1", "D", "I", "N",
"W", "E", "C", "BT", "_", "DN"};
};

QUILL_END_NAMESPACE
Loading

0 comments on commit 1d57c47

Please sign in to comment.