mirror of
https://github.com/ppy/osu
synced 2025-03-02 09:30:57 +00:00
Display Important/Error logging in notifications for now.
This commit is contained in:
parent
580584a015
commit
753232533a
@ -25,6 +25,7 @@ using OpenTK;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
|
||||
namespace osu.Game
|
||||
{
|
||||
@ -130,6 +131,16 @@ namespace osu.Game
|
||||
Origin = Anchor.TopRight,
|
||||
}).Preload(this, overlayContent.Add);
|
||||
|
||||
Logger.NewEntry += entry =>
|
||||
{
|
||||
if (entry.Level < LogLevel.Important) return;
|
||||
|
||||
notificationManager.Post(new SimpleNotification
|
||||
{
|
||||
Text = $@"{entry.Level}: {entry.Message}"
|
||||
});
|
||||
};
|
||||
|
||||
Dependencies.Cache(options);
|
||||
Dependencies.Cache(musicController);
|
||||
Dependencies.Cache(notificationManager);
|
||||
|
Loading…
Reference in New Issue
Block a user