/* Copyright 2010 © by YeZZx aka Crunkx */
using System;

namespace LoginServer
{
    public enum C
    {
        MSG_SUCCESS,
        MSG_ERROR,
        MSG_ISC,
        MSG_NETWORK,
        MSG_DEBUG,
        MSG_INFO
    }

    class cLog
    {
        public cLog(C c, string sText )
        {
            lock (cMain.threadLock)
            {
                switch (c)
                {
                    case C.MSG_SUCCESS:
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.Write("[SUCCESS]");
                        break;
                    case C.MSG_ERROR:
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.Write("[ERROR]");
                        break;
                    case C.MSG_ISC:
                        Console.ForegroundColor = ConsoleColor.Cyan;
                        Console.Write("[ISC]");
                        break;
                    case C.MSG_NETWORK:
                        Console.ForegroundColor = ConsoleColor.Yellow;
                        Console.Write("[NETWORK]");
                        break;
                    case C.MSG_DEBUG:
                        Console.ForegroundColor = ConsoleColor.Gray;
                        Console.Write("[DEBUG]");
                        break;
                    case C.MSG_INFO:
                        Console.ForegroundColor = ConsoleColor.DarkMagenta;
                        Console.Write("[INFO]");
                        break;
                }

                if (sText != "")
                {
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.WriteLine(sText);
                }
            }
        }
    }
}
/* Copyright 2010 © by YeZZx aka Crunkx */