Repository navigation
[log2src] use the log levels of statements - #1762
Merged
Merged
Conversation
log2src now gives each statement the level of its logging call. The message's level is passed along when looking for its statement, so a statement with the same level wins a tie, and source_log_stmt() has a new level column. lnav-rs-ext points at the log2src branch that brings the levels into caching1 until that is merged. The expected output for the patterns that now allow empty values, from the previous log2src update, is updated too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KTECZJ1AReK76iN7tgD1KY
Owner
Author
|
Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KTECZJ1AReK76iN7tgD1KY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KTECZJ1AReK76iN7tgD1KY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KTECZJ1AReK76iN7tgD1KY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KTECZJ1AReK76iN7tgD1KY
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.
Requested by Tim · project thread
Updates lnav for log2src's new per-statement log levels (tstack/log2src#2). Those levels reached
caching1through tstack/log2src#3, which is now merged, solnav-rs-extis back onbranch = "caching1"and its lockfile is pinned to6c6ebcc.Changes
find_log_statement()andfind_log_statement_json()now take the message's level. This lets log2src prefer a statement with the same level when several match equally well. lnav's level names map onto log2src's:debug2–debug5becomedebugstatsbecomesinfounknown,invalid, andheaderpass no levelThe callers that pass the line's level are
all_logs,log_stmt_stats(both matching and sampling), andlog_data_helper.FindLogResulthas alevelfield.source_log_stmt()has a newlevelcolumn afterblock_id, which uses lnav's level names and is NULL when log2src couldn't tell, as with aprintf().The level is not added to
log_msg_src, solog_msg_schemahashes don't change.I regenerated the cxx bridge files with cxxbridge 1.0.205, the same version as the lockfile.
I added a NEWS entry.
Tests
test_log2src.shnow selectslevelfromsource_log_stmt(). The new expected output shows these levels:I removed the old expected files for those commands.
I updated the expected
log_msg_formatfrom(.+)to(.*). That change comes from the previous log2src bump, which lets placeholders be empty; master's expected output hadn't caught up yet.test_cmds.sh: the help output now includes the new column.Local autotools build:
test_cmds.shpasses.test_log2src.shshows only two diffs, and both come from the sandbox: a permission-denied check that doesn't fail when running as root, and a stack-frame path under/home/userthat gets rewritten to{top_srcdir_parent}.🤖 Generated with Claude Code
https://claude.ai/code/session_01KTECZJ1AReK76iN7tgD1KY