private void SubmitTraceEventGUI(CompilerEvent compilerEvent, string info) { if (compilerEvent != CompilerEvent.DebugInfo) { SetStatus(compilerEvent.ToText() + ": " + info); toolStripStatusLabel1.GetCurrentParent().Refresh(); } }
void ITraceListener.OnCompilerEvent(CompilerEvent compilerEvent, string message, int threadID) { lock (_statusLock) { Status = compilerEvent.ToText() + ": " + message; } SubmitTraceEvent(compilerEvent, message, threadID); }
private void NotifyEvent(CompilerEvent compilerEvent, string message, int threadID) { message = string.IsNullOrWhiteSpace(message) ? string.Empty : $"{message}"; var status = $"{compilerEvent.ToText()}{message}"; lock (_statusLock) { Status = status; } SubmitTraceEvent(compilerEvent, message, threadID); }
private void NotifyEvent(CompilerEvent compilerEvent, string message, int threadID) { if (compilerEvent != CompilerEvent.Counter) { var status = compilerEvent.ToText() + (string.IsNullOrWhiteSpace(message) ? string.Empty : $": {message}"); lock (_statusLock) { Status = status; } } SubmitTraceEvent(compilerEvent, message, threadID); }
private void SubmitTraceEvent(CompilerEvent compilerStage, string message, int threadID) { lock (compilerStageLock) { if (compilerStage == CompilerEvent.Error) { errorLog.Append(compilerStage.ToText()).Append(": ").AppendLine(message); compileLog.AppendFormat("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds).Append(" [").Append(threadID.ToString()).Append("] ").Append(compilerStage.ToText()).Append(": ").AppendLine(message); } if (compilerStage == CompilerEvent.Exception) { var stringBuilder = exceptionLog.Append(compilerStage.ToText()).Append(": ").AppendLine(message); var stringBuilder2 = compileLog.AppendFormat("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds).Append(" [").Append(threadID.ToString()).Append("] ").Append(compilerStage.ToText()).Append(": ").AppendLine(message); } else if (compilerStage == CompilerEvent.Counter) { counterLog.Append(compilerStage.ToText()).Append(": ").AppendLine(message); } else { compileLog.AppendFormat("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds).Append(" [").Append(threadID.ToString()).Append("] ").Append(compilerStage.ToText()).Append(": ").AppendLine(message); } } }
private void SubmitTraceEvent(CompilerEvent compilerStage, string message, int threadID) { lock (compilerStageLock) { if (compilerStage == CompilerEvent.Error) { errorLog.AppendLine(compilerStage.ToText() + ": " + message); compileLog.AppendLine(String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " [" + threadID.ToString() + "] " + compilerStage.ToText() + ": " + message); } if (compilerStage == CompilerEvent.Exception) { exceptionLog.AppendLine(compilerStage.ToText() + ": " + message); compileLog.AppendLine(String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " [" + threadID.ToString() + "] " + compilerStage.ToText() + ": " + message); } else if (compilerStage == CompilerEvent.Counter) { counterLog.AppendLine(compilerStage.ToText() + ": " + message); } else { compileLog.AppendLine(String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " [" + threadID.ToString() + "] " + compilerStage.ToText() + ": " + message); } } }
void ITraceListener.OnNewCompilerTraceEvent(CompilerEvent compilerStage, string message, int threadID) { lock (mylock) { if (compilerStage == CompilerEvent.CompilerStageStart || compilerStage == CompilerEvent.CompilerStageEnd || compilerStage == CompilerEvent.Exception) { string status = "Compiling: " + String.Format("{0:0.00}", (DateTime.Now - builder.CompileStartTime).TotalSeconds) + " secs: " + compilerStage.ToText() + ": " + message; builder.AddOutput(status); } else if (compilerStage == CompilerEvent.Counter) { builder.AddCounters(message); } } }
private void SubmitTraceEvent(CompilerEvent compilerEvent, string message, int threadID) { var part = string.IsNullOrWhiteSpace(message) ? string.Empty : ": " + message; var msg = $"{compilerEvent.ToText()}{part}"; var timelog = $"{(DateTime.Now - compileStartTime).TotalSeconds:0.00} [{threadID}] {msg}"; lock (compilerStageLock) { if (compilerEvent == CompilerEvent.Error) { UpdateLog("Error", msg); UpdateLog("Compiler", timelog); } if (compilerEvent == CompilerEvent.Exception) { UpdateLog("Exception", msg); UpdateLog("Compiler", timelog); } else if (compilerEvent == CompilerEvent.Counter) { if (message.StartsWith("Transform-")) { UpdateLog("Transforms", message.Substring(10)); } else { UpdateLog("Counters", message); } } else { UpdateLog("Compiler", timelog); } } }
private string CreateTimeStampedLog(CompilerEvent compilerEvent, string message, int threadID = 0) { return($"{(DateTime.Now - compileStartTime).TotalSeconds:0.00} [{threadID.ToString()}] {compilerEvent.ToText()}: {message}"); }
private void SubmitTraceEvent(CompilerEvent compilerStage, string info) { if (compilerStage == CompilerEvent.CompilerStageStart || compilerStage == CompilerEvent.CompilerStageEnd) { string status = "Compiling: " + String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " secs: " + compilerStage.ToText() + ": " + info; toolStripStatusLabel1.Text = status; toolStripStatusLabel1.GetCurrentParent().Refresh(); AddOutput(status); } }
void ITraceListener.OnCompilerEvent(CompilerEvent compilerEvent, string message, int threadID) { if (compilerEvent == CompilerEvent.PreCompileStageStart || compilerEvent == CompilerEvent.PreCompileStageEnd || compilerEvent == CompilerEvent.PostCompileStageStart || compilerEvent == CompilerEvent.PostCompileStageEnd || compilerEvent == CompilerEvent.Exception) { string status = $"Compiling: {$"{(DateTime.Now - builder.CompileStartTime).TotalSeconds:0.00}"} secs: {compilerEvent.ToText()}: {message}"; lock (_lock) { builder.AddOutput(status); } } else if (compilerEvent == CompilerEvent.Counter) { lock (_lock) { builder.AddCounters(message); } } }
void ICompilerEventListener.SubmitTraceEvent(CompilerEvent compilerStage, string info) { if (compilerStage == CompilerEvent.CompilerStageStart || compilerStage == CompilerEvent.CompilerStageEnd) { string status = "Compiling: " + String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " secs: " + compilerStage.ToText() + ": " + info; toolStripStatusLabel1.Text = status; toolStripStatusLabel1.GetCurrentParent().Refresh(); AddOutput(status); } }
private void NotifyEvent(CompilerEvent compilerEvent, string message, int threadID) { if (compilerEvent != CompilerEvent.MethodCompileEnd && compilerEvent != CompilerEvent.MethodCompileStart && compilerEvent != CompilerEvent.Counter && compilerEvent != CompilerEvent.SetupStageStart && compilerEvent != CompilerEvent.SetupStageEnd && compilerEvent != CompilerEvent.FinalizationStageStart && compilerEvent != CompilerEvent.FinalizationStageEnd) { message = string.IsNullOrWhiteSpace(message) ? string.Empty : $": {message}"; Console.WriteLine($"{(DateTime.Now - CompileStartTime).TotalSeconds:0.00} [{threadID}] {compilerEvent.ToText()}{message}"); } }
private string CreateTimeStampedLog(CompilerEvent compilerEvent, string message, int threadID = 0) { message = string.IsNullOrWhiteSpace(message) ? string.Empty : $": {message}"; return($"{(DateTime.Now - compileStartTime).TotalSeconds:0.00} [{threadID.ToString()}] {compilerEvent.ToText()}{message}"); }
private void NotifyEvent(CompilerEvent compilerEvent, string message, int threadID) { if (compilerEvent == CompilerEvent.CompileStart || compilerEvent == CompilerEvent.CompileEnd || compilerEvent == CompilerEvent.CompilingMethods || compilerEvent == CompilerEvent.CompilingMethodsCompleted || compilerEvent == CompilerEvent.InlineMethodsScheduled || compilerEvent == CompilerEvent.LinkingStart || compilerEvent == CompilerEvent.LinkingEnd || compilerEvent == CompilerEvent.Warning || compilerEvent == CompilerEvent.Error || compilerEvent == CompilerEvent.Exception) { string status = $"Compiling: {$"{(DateTime.Now - CompileStartTime).TotalSeconds:0.00}"} secs: {compilerEvent.ToText()}"; if (!string.IsNullOrEmpty(message)) { status += $"- { message}"; } Output(status); } else if (compilerEvent == CompilerEvent.Counter) { AddCounters(message); } }
void ITraceListener.OnCompilerEvent(CompilerEvent compilerEvent, string message, int threadID) { if (compilerEvent == CompilerEvent.CompilerStart || compilerEvent == CompilerEvent.CompilerEnd || compilerEvent == CompilerEvent.CompilingMethods || compilerEvent == CompilerEvent.CompilingMethodsCompleted || compilerEvent == CompilerEvent.InlineMethodsScheduled || compilerEvent == CompilerEvent.LinkingStart || compilerEvent == CompilerEvent.LinkingEnd || compilerEvent == CompilerEvent.Warning || compilerEvent == CompilerEvent.Error || compilerEvent == CompilerEvent.Exception) { string status = $"Compiling: {$"{(DateTime.Now - builder.CompileStartTime).TotalSeconds:0.00}"} secs: {compilerEvent.ToText()}"; if (!string.IsNullOrEmpty(message)) { status += $"- { message}"; } lock (_lock) { builder.AddOutput(status); } } else if (compilerEvent == CompilerEvent.Counter) { lock (_lock) { builder.AddCounters(message); } } }