Skip to content

Feature Request: Support rotated filenames like app.1.log in MultiFile pattern #696

Description

@Pr0metheus2

Feature Request: Support mid-filename index tags ($J, $I) before file extensions

Problem

LogExpert currently only groups MultiFile chains if the index/sequence number is at the very end of the filename (e.g., app.log, app.log.1, app.log.2).

When rotated logs put the index before the extension (e.g., app.log, app.1.log, app.2.log), LogExpert fails to group them. Patterns like *$J(.).log or *$J(.) fail and only match app.log, app.log.1, app.log.2 etc.


Proposed Solution

Allow index tags ($J, $I) to appear before a fixed file extension suffix in the File name pattern mask.

Example Pattern: *$J(.).log

  • app.log ➔ Active log (Index 0, prefix + index hidden)
  • app.1.log ➔ Rotated log (Index 1)
  • app.2.log ➔ Rotated log (Index 2)

LogExpert should automatically combine them into a single MultiFile sequence.


Current Pattern Syntax Tested

Based on the application's supported syntax:

  • * = Any characters (wildcard)
  • $D(<date>) = Date pattern (DD, MM, YY[YY])
  • $I = File index number
  • $J = File index number, hidden when zero
  • $J(<prefix>) = Like $J, but adding <prefix> when non-zero

Why this is needed

Standard logging frameworks (such as log4net, NLog, log4j, and Linux logrotate) commonly output mid-filename index rotation (app.1.log). Users cannot always modify third-party log output formats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions