mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
Merge pull request #6493 from peppy/logging-init-method
Add entry point to `Game` for logging setup purposes
This commit is contained in:
@@ -128,6 +128,20 @@ namespace osu.Framework
|
||||
|
||||
protected sealed override void AddInternal(Drawable drawable) => throw new InvalidOperationException($"Use {nameof(Add)} or {nameof(Content)} instead.");
|
||||
|
||||
/// <summary>
|
||||
/// The earliest point of entry during <see cref="GameHost.Run"/> starting execution of a game.
|
||||
/// This should be used to set up any low level tasks such as exception handling.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// At this point in execution, only <see cref="GameHost.Storage"/> and <see cref="GameHost.CacheStorage"/> are guaranteed to be valid for use.
|
||||
/// They are provided as <paramref name="gameStorage"/> and <paramref name="cacheStorage"/> respectively for convenience.
|
||||
/// </remarks>
|
||||
/// <param name="gameStorage">The default game storage.</param>
|
||||
/// <param name="cacheStorage">The default cache storage.</param>
|
||||
public virtual void SetupLogging(Storage gameStorage, Storage cacheStorage)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
|
||||
@@ -741,6 +741,7 @@ namespace osu.Framework.Platform
|
||||
CacheStorage = GetDefaultGameStorage().GetStorageForDirectory("cache");
|
||||
|
||||
SetupForRun();
|
||||
game.SetupLogging(Storage, CacheStorage);
|
||||
|
||||
populateInputHandlers();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user