Skip to content

Introduce "Folder" data source #125

@Kittyfisto

Description

@Kittyfisto

The problem:
The user wants to sift through dozens of log files which are written to a directory subtree. The list of log files can be subject to change (rolling file appenders, app might auto delete old log files).

With the current setup, a user has to manually drag and drop N files into Tailviewer, organize them into a group. When new files are created, the user has to add them all manually. This is freaking tedious when the amount of log files approaches hundreds.

The solution:
A user shall be able to add a folder source to Tailviewer. The following behaviour applies:

  • Files which have been added to the folder (or a sub-folder) are automatically added as child data sources to the folder in the data source tree within .5 seconds
  • Files which have been deleted are removed within .5 seconds
  • The settings of a child data source are NOT forgotten when its file is removed from disk. Instead all settings shall be persisted forever (until the folder source is removed)
  • When a previously deleted file appears again, then ALL previous settings are immediately applied again (activated filters, search, log level filters, follow tail, the simply everything)
  • A folder data source presents a merged view onto all of its children (again, recursively)
  • Only the top level folder data source can be removed. Doing so removes itself and all of its children immediately
  • Child data sources of a folder data source cannot be removed from the tree like normal file data sources (the user has to delete the file on disk)
  • Dragging a folder into Tailviewer automatically creates a new folder data source or selects the data source if that folder has already been added before

Possible future extensions:

  • Add folder configuration
    • Recursive: yes/no
    • Regular expression to define which files shall be included (does this suffice?)

UI Mockup:
image

Technical details

  • This feature only makes sense when merging many files becomes way faster: The current implementation takes ages to merge 20+ files - this must be due to
    • One o more bugs in the MergedLogFile merge implementation
    • A suboptimal algorithm to merge log file deltas
  • Re-use folder watches and other I/O related stuff from https://github.com/Kittyfisto/System.Extensions

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions