Exemplo n.º 1
0
 /// <summary>
 /// Log
 /// </summary>
 /// <param name="logMessage"></param>
 /// <param name="w"></param>
 private void Log(LOG_LEVEL_ENUM logLevel, string logMessage, TextWriter w)
 {
     w.WriteLine("{0} {1} {2}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), logLevel.ToString(), logMessage);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Log
 /// </summary>
 /// <param name="logMessage"></param>
 /// <param name="w"></param>
 private void Log(LOG_LEVEL_ENUM logLevel, string logMessage, int lineNumber, string caller, string fileName, TextWriter w)
 {
     w.WriteLine("{0} {1} {2} {3} {4} {5}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), logLevel.ToString().PadRight(5), fileName.PadRight(30), caller.PadRight(35), lineNumber.ToString().PadRight(5), logMessage);
 }