Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace all Console.WriteLines with Logger.Log (#68) #76

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osu-framework
Submodule osu-framework updated 144 files
9 changes: 5 additions & 4 deletions osu.Game/OsuGame.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using System;
Expand All @@ -22,6 +22,7 @@
using OpenTK.Input;
using System.IO;
using osu.Game.Beatmaps.IO;
using osu.Framework.Logging;

namespace osu.Game
{
Expand Down Expand Up @@ -62,10 +63,10 @@ public override void Load(BaseGame game)
if (args.Length == 1 && File.Exists(args[0]))
{
BeatmapIPC.SendMessage(new ImportBeatmap { Path = args[0] }).Wait();
Console.WriteLine(@"Sent file to running instance");
Logger.Log(@"Sent file to running instance");
}
else
Console.WriteLine(@"osu! does not support multiple running instances.");
Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error);
Environment.Exit(0);
}

Expand All @@ -80,7 +81,7 @@ public override void Load(BaseGame game)
catch (Exception ex)
{
// TODO: Show the user some info?
Console.WriteLine($@"Failed to import beatmap: {ex}");
Logger.Log($@"Failed to import beatmap: {ex}", LoggingTarget.Runtime, LogLevel.Error);
}
};

Expand Down