protected override void HandleNodeMessage(LogMessageForNode logMessage) { if (UseTestCoordinator) { var nodeMessage = new MultiNodeLogMessage(logMessage.When.Ticks, logMessage.Message, logMessage.NodeIndex, logMessage.LogSource, logMessage.Level); TestCoordinatorActorRef.Tell(nodeMessage); } }
protected override void HandleNodeMessage(LogMessageForNode logMessage) { if (UseTestCoordinator) { var nodeMessage = new MultiNodeLogMessage(logMessage.When.Ticks, logMessage.Message, logMessage.NodeIndex, logMessage.LogSource, logMessage.Level); TestCoordinatorActorRef.Tell(nodeMessage); } }
public static bool TryParseLogMessage(string messageStr, out LogMessageForNode logMessage) { var matchLog = NodeLogMessageRegex.Match(messageStr); if (!matchLog.Success) { logMessage = null; return(false); } LogLevel logLevel; Enum.TryParse(matchLog.Groups["level"].Value, true, out logLevel); var logSource = matchLog.Groups["logsource"].Value; var message = matchLog.Groups["message"].Value; var nodeIndex = Int32.Parse(matchLog.Groups["node"].Value); logMessage = new LogMessageForNode(nodeIndex, message, logLevel, DateTime.UtcNow, logSource); return(true); }
private void WriteNodeMessage(LogMessageForNode nodeMessage) { Console.ForegroundColor = ColorForLogLevel(nodeMessage.Level); Console.WriteLine(nodeMessage.ToString()); Console.ResetColor(); }
protected override void HandleNodeMessage(LogMessageForNode logMessage) { WriteNodeMessage(logMessage); base.HandleNodeMessage(logMessage); }
private void WriteNodeMessage(LogMessageForNode nodeMessage) { Console.ForegroundColor = ColorForLogLevel(nodeMessage.Level); Console.WriteLine(nodeMessage.ToString()); Console.ResetColor(); }
protected override void HandleNodeMessage(LogMessageForNode logMessage) { WriteNodeMessage(logMessage); base.HandleNodeMessage(logMessage); }
public static bool TryParseLogMessage(string messageStr, out LogMessageForNode logMessage) { var matchLog = NodeLogMessageRegex.Match(messageStr); if (!matchLog.Success) { logMessage = null; return false; } LogLevel logLevel; Enum.TryParse(matchLog.Groups["level"].Value, true, out logLevel); var logSource = matchLog.Groups["logsource"].Value; var message = matchLog.Groups["message"].Value; var nodeIndex = Int32.Parse(matchLog.Groups["node"].Value); logMessage = new LogMessageForNode(nodeIndex, message, logLevel, DateTime.UtcNow, logSource); return true; }
protected abstract void HandleNodeMessage(LogMessageForNode logMessage);
protected abstract void HandleNodeMessage(LogMessageForNode logMessage);