Add file-based logging foundation - #105
Merged
Merged
Conversation
Register a file logger that persists entries to a rotating file under the app's local data folder, so logs survive on a sideloaded UWP/Xbox install where console and debug output is unavailable (retrievable via Device Portal). Wire ILogger<T> into DI and log representative events (auth flow, playback start/stop/errors) plus global unhandled and unobserved-task exceptions.
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.
Summary
This adds a persistent
Microsoft.Extensions.Loggingfoundation for JellyBox so diagnostics from sideloaded UWP/Xbox builds survive beyond debugger/console output. A custom rotating fileILoggerProviderwrites to the app'sApplicationData.Current.LocalFolder\logsfolder for Device Portal retrieval, is registered through DI, and is flushed during crash/suspend paths. Representative app, auth, navigation, library/search/item, and playback diagnostics now use injectedILogger<T>with CA1848-compliant[LoggerMessage]source-generated methods.Why this is safe
FileLoggerProvidersingleton is the same instance used by the logging factory and flush path.Debuglevel and remain silent with the defaultInformationminimum level.Validation
msbuild JellyBox.sln -t:Build -p:Configuration=Debug -p:Platform=x64Out of scope
App.xaml.csandAppServices.cs; this PR's edits there are limited to additive logging registration/lifecycle hooks, so a small rebase may be needed.Linked issues / todos