Beispiel #1
0
        protected override void Log(LogChanel chanel, string message, bool withDateTime)
        {
            switch (chanel)
            {
            case LogChanel.Usual:
                Console.ForegroundColor = Settings.ConsoleOutputColor;
                break;

            case LogChanel.Info:
                Console.ForegroundColor = Settings.ConsoleInfoColor;
                break;

            case LogChanel.Error:
                Console.ForegroundColor = Settings.ConsoleErrorColor;
                break;
            }

            Console.WriteLine(
                withDateTime ? LogMsgTemplate : message,
                DateTime.Now,
                chanel.ToString(),
                message);

            Console.ResetColor();
        }
Beispiel #2
0
 public void LogWarning(LogChanel chanel, string message)
 {
     if (Chanels.Contains(chanel))
     {
         Debug.LogErrorFormat("[{0}] {1}", chanel, message);
     }
 }
Beispiel #3
0
 protected abstract void Log(LogChanel chanel, string message, bool withDateTime);