forked from SantasCode/Tiled2Dmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Log.cs
39 lines (38 loc) · 1.44 KB
/
Log.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tiled2Dmap.CLI
{
public static class Log
{
public static void Error(string Message, ConsoleColor BackColor = ConsoleColor.Red, ConsoleColor TextColor = ConsoleColor.Black)
{
ConsoleColor currTextColor = Console.ForegroundColor;
ConsoleColor currColor = Console.BackgroundColor;
Console.BackgroundColor = BackColor;
Console.ForegroundColor = TextColor;
Console.Write("ERROR:");
Console.BackgroundColor = currColor;
Console.ForegroundColor = currTextColor;
Console.WriteLine($" {Message}");
}
public static void Warn(string Message, ConsoleColor BackColor = ConsoleColor.Yellow, ConsoleColor TextColor = ConsoleColor.Black)
{
ConsoleColor currTextColor = Console.ForegroundColor;
ConsoleColor currColor = Console.BackgroundColor;
Console.BackgroundColor = BackColor;
Console.ForegroundColor = TextColor;
Console.Write("WARN: ");
Console.BackgroundColor = currColor;
Console.ForegroundColor = currTextColor;
Console.WriteLine($" {Message}");
}
public static void Info(string Message)
{
Console.Write("INFO:");
Console.WriteLine($" {Message}");
}
}
}