wabbajack/Wabbajack.CLI/CLIUtils.cs

28 lines
605 B
C#
Raw Normal View History

2020-02-24 16:50:58 +00:00
using System;
namespace Wabbajack.CLI
{
internal static class CLIUtils
{
internal static void Log(string msg, bool newLine = true)
{
//TODO: maybe also write to a log file?
if(newLine)
Console.WriteLine(msg);
else
Console.Write(msg);
}
2020-02-24 17:05:42 +00:00
internal static int Exit(string msg, int code)
{
Log(msg);
return code;
}
2020-02-24 16:50:58 +00:00
internal static void LogException(Exception e, string msg)
{
Console.WriteLine($"{msg}\n{e}");
}
}
}