1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 04:02:59 +08:00

Replace Console.WriteLine with Logger.Log.

This commit is contained in:
autismpp 2016-10-14 14:09:35 +03:00
parent 123d92f5b9
commit 7276038ca7
No known key found for this signature in database
GPG Key ID: 0AE12B5F901A5621

View File

@ -22,6 +22,7 @@ using osu.Game.Input;
using OpenTK.Input;
using System.IO;
using osu.Game.Beatmaps.IO;
using osu.Framework.Logging;
namespace osu.Game
{
@ -62,10 +63,10 @@ namespace osu.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);
}
@ -79,7 +80,7 @@ namespace osu.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);
}
};