Repository navigation
Keep file logging from crashing background launches - #216
Merged
Merged
Conversation
FileLogHandler opened the day's log file inside Logger.init and called fatalError when that failed. FlowKit Controller build 518 crashed this way twice on 2026-10-18 during background launches, before didFinishLaunchingWithOptions ran. - FileHandlerOutputStream opens the file on the first write and reopens it on the next write after an open or write error; the first failure in a row is logged, the entries in between reach OSLog only - initLogging shares one stream across all logger labels, so creating a Logger no longer touches the file system - logFileDirectory() is public and the App Logs screen reads from it; it read Documents/ while the files have been written to Documents/logs/ since #183 Fixes #215
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FileHandlerOutputStreamopens the day's log file on the first write and reopens it after an open or write error instead of callingfatalErrorinitLoggingshares one stream across all logger labels, soLogger.initdoes no file I/OlogFileDirectory()(Documents/logs/) again; it has readDocuments/since Cluster wedge: observability + provenance + Xcode 27 build fix聽#183FileLogHandlerTestscover a failed open (exit test) and the recovery once the directory is writableFixes #215