Skip to content

Fix Square Bracket timeshift dropping bracket fields and message (#713) - #755

Closed
Hirogen wants to merge 1 commit into
Developmentfrom
fix/713-squarebracket-timeshift
Closed

Hirogen wants to merge 1 commit into
Developmentfrom
fix/713-squarebracket-timeshift

Conversation

@Hirogen

@Hirogen Hirogen commented Nov 20, 2026

Copy link
Copy Markdown
Member

Summary

When the Square Bracket Columnizer had a nonzero time offset, SplitLine returned the shifted date and time but empty values for every bracket field and the message. The offset branch passed only the reformatted timestamp to SquareSplit and discarded the rest of the line. With offset 0 the columns were correct.

The fix rebuilds the line from the shifted timestamp plus the original text after it, then splits that. The zero-offset path and SquareSplit are unchanged.

Tests

Added to SquareBracketColumnizerTest (written first; they failed before the fix):

  • SplitLine_TimeOffset_KeepsBracketFieldsAndMessage: offsets 0, +123 ms, −1505 ms, and a date rollover forward and backward. Each case checks all five columns.
  • SplitLine_TimeOffsetResetToZero_RestoresOriginalColumns: setting the offset back to 0 restores the original columns, and the log line is never changed.

Square Bracket and marker-snapshot tests: 16/16 pass.

…ve (#713)

The nonzero-offset branch of SquareBracketColumnizer.SplitLine split only the
reformatted timestamp, so all columns after the time came back empty. Rebuild
the line from the shifted timestamp plus the original suffix before splitting.
@Hirogen

Hirogen commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

duplicated

@Hirogen Hirogen closed this Nov 20, 2026
@Hirogen
Hirogen deleted the fix/713-squarebracket-timeshift branch November 20, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant