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)); } }
public void LogMessage(LoggersTypeEnum loggerType, string message) { _consoleLogger.LogMessage(loggerType, message); _textFileLogger.LogMessage(loggerType, message); }
public void LogMessage(LoggersTypeEnum loggerType, String message) { Console.WriteLine(String.Format("{0}: {1}", loggerType.ToString(), message)); }