Skip to content

Catch IO Exceptions for RollingFileLogWritter#472

Merged
samhill303 merged 4 commits intomainfrom
sh/bugfix-468
Mar 20, 2026
Merged

Catch IO Exceptions for RollingFileLogWritter#472
samhill303 merged 4 commits intomainfrom
sh/bugfix-468

Conversation

@samhill303
Copy link
Copy Markdown
Collaborator

fixes #468
Catch IO exceptions so that it doesn't crash the coroutine, then start logging again when able. This reduces the impact of the file access getting removed when the device is locked

@KevinSchildhorn
Copy link
Copy Markdown
Contributor

Do we need to keep track of any logs that weren't logged during the exception? For example if I log "Hello World" while the device is logged and in the background will it eventually be logged, or dropped?

@samhill303
Copy link
Copy Markdown
Collaborator Author

Do we need to keep track of any logs that weren't logged during the exception? For example if I log "Hello World" while the device is logged and in the background will it eventually be logged, or dropped?

It will be dropped. We could consider adding a buffer in the future, but this at least keeps the coroutine from silently crashing

@samhill303 samhill303 merged commit 42ff100 into main Mar 20, 2026
2 checks passed
@samhill303 samhill303 deleted the sh/bugfix-468 branch March 20, 2026 13:14
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.

RollingFileLogWriter can throw on iOS

2 participants