public static void InitializeLogging(ClientInformation c) { client = c; Directory.CreateDirectory(Directory.GetCurrentDirectory() + "/logs"); if (client.CanFileLog(LogLevel.ERROR)) { log = new FileWriter($"log_{DateTime.Now.ToFileTime()}.log", "/logs"); } }
/// <summary> /// Display a [msg] message. /// </summary> /// <param name="message">information about the action</param> public static void Message(string message) { if (client == null) { return; } Console.ForegroundColor = ConsoleColor.White; if (client.CanLog(LogLevel.MESSAGE)) { Console.WriteLine("[msg]: " + message); } if (client.CanFileLog(LogLevel.MESSAGE)) { log?.Write(message); } }