mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
28 lines
605 B
C#
28 lines
605 B
C#
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);
|
|
}
|
|
|
|
internal static int Exit(string msg, int code)
|
|
{
|
|
Log(msg);
|
|
return code;
|
|
}
|
|
|
|
internal static void LogException(Exception e, string msg)
|
|
{
|
|
Console.WriteLine($"{msg}\n{e}");
|
|
}
|
|
}
|
|
}
|