From 753232533acb467ee5eeae3213e620b7e3aef544 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 15 Feb 2017 12:37:57 +0900 Subject: [PATCH] Display Important/Error logging in notifications for now. --- osu.Game/OsuGame.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 9188fab355..2cce0aa0ce 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -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);