ASCU_ALL/SupportClasses/Logger.cs

22 lines
493 B
C#
Raw Permalink Normal View History

using System;
using System.Collections.Generic;
2020-11-18 16:56:28 +05:00
using System.Linq;
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);
}
}
}
}