Messages shown in the console with a specified color and prefix
Exemplo n.º 1
0
 /// <summary>
 /// Writes text to the console on a new line, using the specified log prefix
 /// </summary>
 public static void WriteLine(LogType type, string text)
 {
     type.WriteText(text);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Writes text to the console on a new line, using the specified log prefix, and a color for the rest of the text
 /// </summary>
 public static void WriteLine(LogType type, ConsoleColor color, string text, params object[] objs)
 {
     WriteLine(type, color, string.Format(text, objs));
 }
Exemplo n.º 3
0
        static LogType()
        {
            sb = new StringBuilder();

            //Types
            Standard = new LogType("", ConsoleColor.White);
            Error = new LogType("Error", ConsoleColor.Red);
            Chat = new LogType("Chat", ConsoleColor.Yellow);
            Server = new LogType("Server", ConsoleColor.Green);
            Room = new LogType("Room", ConsoleColor.Magenta);
            Status = new LogType("Status", ConsoleColor.Cyan);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Writes text to the console on a new line, using the specified log prefix, and a color for the rest of the text
 /// </summary>
 public static void WriteLine(LogType type, ConsoleColor color, string text)
 {
     type.WriteText(text, color);
 }