Save filtered logs as original lines instead of TSV table - #36
Merged
Conversation
The "save filtered" action re-joined parsed fields (line number, date, time, level, pid, tid, tag, message) with tabs, producing a table that did not match the source — most visibly for adb streams, whose saved output no longer looked like logcat. Each LogEntry already stores the complete original line as its backing buffer, so expose it via a new `raw()` getter and write that verbatim. Saved files now preserve the source format (adb stream / original file) and can be re-parsed by LogFilter or other tools. Save scope is unchanged: still the current filtered rows (all rows when no filter set).
laomou
force-pushed
the
feature/save-raw-lines
branch
from
July 27, 2026 03:26
18000b0 to
bfb4c4f
Compare
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.
What
The Save filtered action used to re-join each entry's parsed fields (line number, date, time, level, pid, tid, tag, message) with tabs, producing an internal TSV table. This didn't match the source — most visibly for adb streams, whose saved output no longer looked like logcat.
Now it writes each entry's original line verbatim, so saved files preserve the source format (adb stream / original file) and can be re-parsed by LogFilter or other tools.
How
Every
LogEntryalready stores the whole original line as its backing buffer (fields are just byte ranges into it), so no extra memory is needed:src/model.rs— add araw()getter returning the complete original line.src/app.rs—save_filteredsnapshots and writesraw()per row instead of re-joining fields with\t.Scope unchanged
Still saves the current filtered rows (which equals all rows when no filter is set). Only the output format changed, not which rows are saved.
Testing
cargo build— clean, no new warnings.cargo test— all 79 tests pass.