Skip to content

Bound Remote Server log file size and retention - #73

Open
Shao-Chicken wants to merge 1 commit into
ASCOMInitiative:mainfrom
Shao-Chicken:fix/bounded-log-retention
Open

Bound Remote Server log file size and retention#73
Shao-Chicken wants to merge 1 commit into
ASCOMInitiative:mainfrom
Shao-Chicken:fix/bounded-log-retention

Conversation

@Shao-Chicken

Copy link
Copy Markdown

Summary

This change bounds ASCOM Remote Server trace logging growth so servers no longer consume unlimited disk space over time.

Changes

  • Add bounded logging for server-side trace logs in Remote Server only, with:
    • default max file size of 50 MiB
    • up to 10 retained files per logger type
  • Keep behavior explicit and local to the Remote Server logger types; compatibility for non-targeted/default logger paths is preserved.
  • Make midnight rollover respect a custom trace folder path.
  • Improve retention cleanup safety:
    • exact file pattern matching (ASCOM.{type}.*.txt)
    • ignore unrelated paths/files
    • skip reparse points
  • Add regression tests in Remote Server.Tests for size rollover and cross-day retention.

Verification

  • dotnet build ASCOM Remote.sln --configuration Release --no-restore
  • dotnet test Remote Server.Tests/Remote Server.Tests.csproj --configuration Release --no-restore

Notes

Related issue context: ASCOMRemote issue #55

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