コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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());
 }
コード例 #3
0
 public NicoLogger(Enums.LOGLEVEL _loglevel = Enums.LOGLEVEL.Log)
 {
     loglevel = _loglevel;
 }