/// <summary> /// Called when a test message is received. /// </summary> private void TestMessageHandler(object sender, TestRunMessageEventArgs e) { try { switch (e.Level) { case TestMessageLevel.Informational: _teamCityWriter.WriteMessage(e.Message); break; case TestMessageLevel.Warning: _teamCityWriter.WriteWarning(e.Message); break; case TestMessageLevel.Error: _teamCityWriter.WriteError(e.Message); break; } } catch (Exception ex) { _teamCityWriter.WriteError("TeamCity Logger Error", ex.ToString()); } }
public void Write([NotNull] string message, MessageState messageState) { if (message == null) { throw new ArgumentNullException(nameof(message)); } switch (messageState) { case MessageState.Warning: _writer.WriteWarning(message); break; case MessageState.Error: _writer.WriteError(message); break; default: _writer.WriteMessage(message); break; } }
public void log_an_error_event_containing(string message, params object[] args) { _logger.WriteError(string.Format(message, args)); }
public void NotifyAboutError(Exception ex) { serviceMessage.WriteError(ex.GetFullExceptionMessage(), ex.StackTrace); }