-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLogger.cs
26 lines (25 loc) · 1.06 KB
/
Logger.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
using Colors.Net;
using static Colors.Net.StringStaticMethods;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RamApidotnet
{
public class Logger
{
public static void Info(string name, string message)
{
ColoredConsole.WriteLine($"{Cyan(string.Format("{0:hh:mm:ss tt}", DateTime.Now).ToUpper())}{Gray(" - ")}{Blue("[")}{Cyan(name)}{Blue("]")} {Green("Info")}{Gray(" | ")}{Green(message)}");
}
public static void Warn(string name, string message)
{
ColoredConsole.WriteLine($"{Cyan(string.Format("{0:hh:mm:ss tt}", DateTime.Now).ToUpper())}{Gray(" - ")}{Blue("[")}{Cyan(name)}{Blue("]")} {Yellow("Warn")}{Gray(" | ")}{Yellow(message)}");
}
public static void Error(string name, string message)
{
ColoredConsole.WriteLine($"{Cyan(string.Format("{0:hh:mm:ss tt}", DateTime.Now).ToUpper())}{Gray(" - ")}{Blue("[")}{Cyan(name)}{Blue("]")} {Red("Error")}{Gray(" | ")}{Red(message)}");
}
}
}