Skip to content

Add Roll on specific DayOfWeek #325

Closed
@walterstypula

Description

@walterstypula

Is your feature request related to a problem? Please describe.
I'd like to have the ability to roll the log file on a specific day of the week. Currently, log entry aggregation isn't too loose or too aggressive. The jump from a day to month is too large.

  1. When day configuration is used we may encounter data loss if we do not keep enough rolling files.
  2. When month configuration is used, large log file(s) maybe the result.

Describe the solution you'd like
For any day, Sunday through Saturday, we want to select a specific day to aggregate all log entries into a specific date file for the chosen roll on day.

For example, if today is Monday, Jan 1, 2024 or Tuesday, Jan 2, 2024 and I want all logs aggregated on a Sunday. All logs from that Monday, Tuesday, etc. should be added to the file with Sunday's Date: 2023-12-31. When the today's date hits Sunday, 2024-01-07 a new log file should be created and all subsequent days should log entries into this new log file until the next roll on date.

Describe alternatives you've considered
Logging by month results in too many log entries in a single file, Logging by day results in too many log files created and data loss.

Additional context
Previous implementations tried to Aggregate by week, however, this doesn't work. These implementations did not fall to a specific date. A new log file would be created whenever the application was restarted. For example, if we had a daily deployment strategy it would create one log file for every day application was deployed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions