Fix/MultiFile pattern (Issue #696) - #697
Open
Pr0metheus2 wants to merge 12 commits into
Open
Pr0metheus2 wants to merge 12 commits into
Pr0metheus2 wants to merge 12 commits into
Conversation
- Fixed/MultiFile rollover patterns with an index before the extension:
- RolloverFilenameBuilder: the parser was dropping literal text after the final placeholder, including .log.
- *$J(.).log now correctly expands: app.log → app.1.log → app.2.log.
- Updated MultiFile mask dialog legend:
- Fixed incorrectly displayed <date> and <prefix> placeholders in English and German resources.
- Added both usage examples:
*$J(.) → app.log, app.log.1, app.log.2
*$J(.).log → app.log, app.1.log, app.2.log
- Added the examples in English, German, and Chinese.
- Enlarged the dialog and syntax-help label so the date-format lines are no longer clipped.
- Fixed/Items in menu File/Multifile -> "Enable MultiFile" and "Multi file mask...", were always greyed out. Now they are displayed normally after the .log file is open.
- removed the BackColor and ForeColor assignments for both:
- multiFileEnabledStripMenuItem
- multifileMaskToolStripMenuItem
- Added regression coverage:
- Filename-builder tests for app.1.log and app.2.log.
- Reader-level test that loads app.log, app.1.log, and app.2.log in correct order using *$J(.).log.
- Kept the existing *$J(.) coverage for app.log.1 / app.log.2.
Verification:
- Full test suite: 1064 passed, 0 failed, 7 skipped.
- Resource project build: passed with 0 warnings, 0 errors.
Hirogen
requested changes
Aug 28, 2026
Fixed by locating and parsing $D(...) in the escaped format string. Offsets remain correct when literal regex metacharacters appear before the date placeholder. Added a regression test for app.$D(yyyy-MM-dd).log that verifies date parsing and rebuilding. Added cases which cover: - $I with a trailing literal .log, starting from a rotated file. - $D plus $J(.) followed by a trailing .log, also starting from a rotated file.
- Added FlushEscaped() to share duplicated escaping code.
- Fixed parsing of $J(<prefix>) from rotated files, so both:
- app.log.1
- app.1.log
correctly identify index 1.
- Made wildcard matching non-greedy and anchored the generated regex to the complete filename.
- Updated rebuilding logic to remove an existing prefix plus index together before inserting the new index.
- Fixed $D(...) parsing to use positions in the escaped format string, preventing errors when a literal regex character such as . appears before $D.
Contributor
Author
|
Check please |
…mid-filename-index-tags-(app.1.log)
Hirogen
requested changes
Aug 31, 2026
Added a settings migration for the corrected MultiFile mask behavior. Older LogExpert versions accidentally ignored the trailing .log in saved *$J(.).log masks, so users effectively got app.log.1 style rollover files. The parser now correctly supports app.1.log for that mask, but this would otherwise change existing users’ saved behavior. To preserve compatibility, settings version 2 migrates existing saved *$J(.).log preferences to *$J(.). New version-2 settings keep both patterns distinct: - *$J(.) for app.log.1 - *$J(.).log for app.1.log Added tests for migrating old settings and for ensuring new settings are not changed.
Hirogen
requested changes
Sep 5, 2026
Collaborator
|
sorry for longer not writing, got a lot todo at work, just one more thing: ^^ In the dialog layout: at 100% scaling, the German help text needs 270 pixels of height, but the label allows 254, so the final date-format line is still clipped. after that, we can merged it |
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 is a fix for #696
Fixed/MultiFile rollover patterns with an index before the extension:
*$J(.).lognow correctly expands: app.log → app.1.log → app.2.log.Updated MultiFile mask dialog legend:
<date>and<prefix>placeholders in English and German resources.*$J(.)→ app.log, app.log.1, app.log.2*$J(.).log→ app.log, app.1.log, app.2.logBefore

After

Before

After

*$J(.).log.*$J(.)coverage for app.log.1 / app.log.2.Verification:
- Full test suite: 1064 passed, 0 failed, 7 skipped.
- Resource project build: passed with 0 warnings, 0 errors.