/// <summary> /// Loggerを取得する /// </summary> /// <param name="_loglevel"></param> /// <returns></returns> public static NicoLogger GetLogger(Enums.LOGLEVEL _loglevel) { if (logger == null) { logger = new NicoLogger(_loglevel); } return(logger); }
/// <summary> /// コンソールに書き込む /// </summary> /// <param name="content"></param> /// <param name="_loglevel"></param> private void WriteOnConsole(string content, Enums.LOGLEVEL _loglevel, bool inline = false) { if (inline) { Console.CursorLeft = 0; Console.Write($"[{_loglevel.ToString()}] {content}"); } else { Console.WriteLine($"[{_loglevel.ToString()}] {content}"); } SetColor(GetColor()); }
public NicoLogger(Enums.LOGLEVEL _loglevel = Enums.LOGLEVEL.Log) { loglevel = _loglevel; }