2020-11-17 15:44:19 +05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2020-11-18 16:56:28 +05:00
|
|
|
|
using System.Linq;
|
2020-11-17 15:44:19 +05:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace SupportClasses
|
|
|
|
|
{
|
|
|
|
|
public static class Logger
|
|
|
|
|
{
|
2020-11-18 16:56:28 +05:00
|
|
|
|
public enum Level { fatal, error, warning, info, debug};
|
|
|
|
|
public static Level[] show = { Level.info, Level.warning, Level.debug};
|
|
|
|
|
public static void Add (string msg, Level l = Level.info)
|
|
|
|
|
{
|
|
|
|
|
if (show.Contains(l))
|
|
|
|
|
{
|
|
|
|
|
Console.Write(DateTime.Now.ToString(@"yyyy.MM.dd HH:mm:ss.ff") + "\t");
|
|
|
|
|
Console.WriteLine(msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-11-17 15:44:19 +05:00
|
|
|
|
}
|
|
|
|
|
}
|