diff --git a/osu.Framework/Game.cs b/osu.Framework/Game.cs index 1f7a8e827..30d048699 100644 --- a/osu.Framework/Game.cs +++ b/osu.Framework/Game.cs @@ -128,6 +128,20 @@ namespace osu.Framework protected sealed override void AddInternal(Drawable drawable) => throw new InvalidOperationException($"Use {nameof(Add)} or {nameof(Content)} instead."); + /// + /// The earliest point of entry during starting execution of a game. + /// This should be used to set up any low level tasks such as exception handling. + /// + /// + /// At this point in execution, only and are guaranteed to be valid for use. + /// They are provided as and respectively for convenience. + /// + /// The default game storage. + /// The default cache storage. + public virtual void SetupLogging(Storage gameStorage, Storage cacheStorage) + { + } + /// /// As Load is run post host creation, you can override this method to alter properties of the host before it makes itself visible to the user. /// diff --git a/osu.Framework/Platform/GameHost.cs b/osu.Framework/Platform/GameHost.cs index 85b83b988..3d159dc63 100644 --- a/osu.Framework/Platform/GameHost.cs +++ b/osu.Framework/Platform/GameHost.cs @@ -741,6 +741,7 @@ namespace osu.Framework.Platform CacheStorage = GetDefaultGameStorage().GetStorageForDirectory("cache"); SetupForRun(); + game.SetupLogging(Storage, CacheStorage); populateInputHandlers();