Example #1
0
 public void LogMessage(LoggersTypeEnum loggerType, string message)
 {
     try
     {
         var s = String.Format("Text file logger: {0}", message);
         var file = File.AppendText(_fileName);
         file.WriteLine(s);
         file.Close();
     }
     catch(Exception ex)
     {
         Console.WriteLine(String.Format("Error appending file: {0}", ex.Message));
     }
 }
Example #2
0
 public void LogMessage(LoggersTypeEnum loggerType, string message)
 {
     _consoleLogger.LogMessage(loggerType, message);
     _textFileLogger.LogMessage(loggerType, message);
 }
Example #3
0
 public void LogMessage(LoggersTypeEnum loggerType, String message)
 {
     Console.WriteLine(String.Format("{0}: {1}", loggerType.ToString(), message));
 }