/// <summary> /// Write a message to terminal /// </summary> /// <param name="Message"></param> /// <param name="MessageType"></param> public static void Write(string Message, Syslog.Type MessageType) { Message message = new Message(Message, DateTime.Now, MessageType); lock (messages) { messages.Add(message); } }
/// <summary> /// Write a message /// </summary> /// <param name="time"></param> /// <param name="Message"></param> /// <param name="MessageType"></param> public static void Display(DateTime time, string Message, Syslog.Type MessageType) { if (Configuration.System.Colors) { Console.ForegroundColor = ConsoleColor.Blue; } Console.Write("LOG "); if (Configuration.System.Colors) { Console.ForegroundColor = ConsoleColor.Green; } Console.Write("[{0}]", time); if (MessageType == Syslog.Type.Warning) { if (Configuration.System.Colors) { Console.ForegroundColor = ConsoleColor.Yellow; } Console.Write(" [WARNING]"); } else if (MessageType == Syslog.Type.Error) { if (Configuration.System.Colors) { Console.ForegroundColor = ConsoleColor.Red; } Console.Write(" [ERROR]"); } else { if (Configuration.System.Colors) { Console.ForegroundColor = ConsoleColor.DarkCyan; } Console.Write(" [INFO]"); } if (Configuration.System.Colors) { Console.ResetColor(); } Console.WriteLine(": " + Message); }
/// <summary> /// Initializes a new instance of the class. /// </summary> /// <param name='text'> /// Text. /// </param> /// <param name='time'> /// Time. /// </param> /// <param name='MT'> /// M. /// </param> public Message(string text, DateTime time, Syslog.Type MT) { this.Text = text; this.Time = time; this._Type = MT; }
/// <summary> /// Initializes a new instance of the class. /// </summary> /// <param name='text'> /// Text. /// </param> /// <param name='time'> /// Time. /// </param> /// <param name='MT'> /// M. /// </param> public Message(string text, DateTime time, Syslog.Type MT) { this.Text = text; this.Time = time; this.Type = MT; }
public static void SystemLog(string Message, Syslog.Type MessageType) { }