Conversation
astrophysik
reviewed
Mar 13, 2026
| return extra_tags.end(); | ||
| } | ||
|
|
||
| void add_extra_tag(std::string_view key, std::string_view value) noexcept; |
Contributor
There was a problem hiding this comment.
It seems like this methods aren't implemented
| std::array<char, BACKTRACE_BUFFER_SIZE> backtrace_buffer; // NOLINT | ||
| size_t backtrace_size{impl::resolve_log_trace(backtrace_buffer, *trace)}; | ||
| tagged_entries.push_back( | ||
| k2::LogTaggedEntry{.key = BACKTRACE_KEY.data(), .value = backtrace_buffer.data(), .key_len = BACKTRACE_KEY.size(), .value_len = backtrace_size}); |
Contributor
There was a problem hiding this comment.
Here you get pointer to backtrace_buffer witch lifetime expires after if scope ends
| } | ||
| }; | ||
|
|
||
| static constexpr std::string_view BACKTRACE_KEY = "trace"; |
| return extra_tags.size(); | ||
| } | ||
|
|
||
| auto begin() const noexcept { |
Contributor
There was a problem hiding this comment.
Maybe to it like? Instead of pair begin/end
auto values() const noexcept {
return std::views::all()
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR rewrites the logging functions into a single function. This eliminates the need for duplicate logic in different places, making it easier to add new logging changes.