void TaskFinished(object sender, TaskFinishedEventArgs e) { if (!e.Succeeded) { AppendLine(string.Format("<font color='red'>{0}</font> task failed.\r\n{1}", e.TaskName, e.Message).ToMarkdownRawMarkdown()); } if (IsVerbosityAtLeast(LoggerVerbosity.Detailed)) { AppendLine(string.Format("######Task Finished:{0}", e.Message.EscapeMarkdownCharacters()).ToMarkdownRawMarkdown()); AppendLine(e.ToPropertyValues().ToMarkdownTable().ToMarkdown().ToMarkdownRawMarkdown()); } var startInfo = _tasksStarted.Pop(); var execInfo = new ExecutionInfo(startInfo.TaskName, startInfo, e); ExecutionInfo previousExecInfo; this._taskExecuted.TryGetValue(e.TaskName, out previousExecInfo); if (previousExecInfo != null) { execInfo.TimeSpent = execInfo.TimeSpent.Add(previousExecInfo.TimeSpent); } this._taskExecuted[execInfo.Name] = execInfo; }
void ProjectFinished(object sender, ProjectFinishedEventArgs e) { AppendLine("#####Project Finished".ToMarkdownRawMarkdown()); if (IsVerbosityAtLeast(LoggerVerbosity.Normal)) { AppendLine(e.Message.ToMarkdownParagraph()); } if (IsVerbosityAtLeast(LoggerVerbosity.Detailed)) { AppendLine(e.ToPropertyValues().ToMarkdownTable()); } if (IsVerbosityAtLeast(LoggerVerbosity.Diagnostic)) { //e.it } var startInfo = _projectsStarted.Pop(); var execInfo = new ExecutionInfo(e.ProjectFile, startInfo, e); ExecutionInfo prevExecInfo; this._projectsExecutedMap.TryGetValue(e.ProjectFile, out prevExecInfo); if (prevExecInfo != null) { // shouldn't be found for projects but we can handle in either case execInfo.TimeSpent = execInfo.TimeSpent.Add(prevExecInfo.TimeSpent); var projToRemove = (from p in _projectsExecuted where p.Name.Equals(execInfo.Name) select p).ToList(); foreach (var p in projToRemove) { _projectsExecuted.Remove(p); } } _projectsExecutedMap[execInfo.Name] = execInfo; _projectsExecuted.Add(execInfo); }
void TargetFinished(object sender, TargetFinishedEventArgs e) { var startInfo = _targetsStarted.Pop(); var execInfo = new ExecutionInfo(startInfo.TargetName, startInfo, e); // see if the target is already in the executed list ExecutionInfo prevExecInfo; this._targetsExecuted.TryGetValue(e.TargetName, out prevExecInfo); if (prevExecInfo != null) { execInfo.TimeSpent = execInfo.TimeSpent.Add(prevExecInfo.TimeSpent); } if (IsVerbosityAtLeast(LoggerVerbosity.Normal)) { AppendLine(e.Message.ToMarkdownParagraph()); } if (!e.Succeeded || IsVerbosityAtLeast(LoggerVerbosity.Detailed)) { this._targetsExecuted[execInfo.Name] = execInfo; string color = e.Succeeded ? "green" : "red"; AppendLine(string.Format( "######<font color='{0}'>{1}</font> target finished", color, e.TargetName).ToMarkdownRawMarkdown()); AppendLine(e.Message.ToMarkdownParagraph()); } if (IsVerbosityAtLeast(LoggerVerbosity.Detailed)) { AppendLine(e.ToPropertyValues().ToMarkdownTable()); } }
void TaskFinished(object sender, TaskFinishedEventArgs e) { if (!e.Succeeded) { AppendLine(string.Format("<font color='red'>{0}</font> task failed.\r\n{1}",e.TaskName, e.Message).ToMarkdownRawMarkdown()); } if (IsVerbosityAtLeast(LoggerVerbosity.Detailed)) { AppendLine(string.Format("######Task Finished:{0}", e.Message.EscapeMarkdownCharacters()).ToMarkdownRawMarkdown()); AppendLine(e.ToPropertyValues().ToMarkdownTable().ToMarkdown().ToMarkdownRawMarkdown()); } var startInfo = _tasksStarted.Pop(); var execInfo = new ExecutionInfo(startInfo.TaskName,startInfo, e); ExecutionInfo previousExecInfo; this._taskExecuted.TryGetValue(e.TaskName, out previousExecInfo); if (previousExecInfo != null) { execInfo.TimeSpent = execInfo.TimeSpent.Add(previousExecInfo.TimeSpent); } this._taskExecuted[execInfo.Name] = execInfo; }