private void SubscriberNewLogMessage(LogMessage logMessage) { string text = "---------------------------------------------------------" + Environment.NewLine + logMessage.GetMessage() + Environment.NewLine + "---------------------------------------------------------"; System.Console.WriteLine(text); }
private void m_logSubscriber_Log(LogMessage logMessage) { switch (logMessage.Level) { case MessageLevel.Critical: case MessageLevel.Error: ServiceHelper?.ErrorLogger?.Log(logMessage.Exception ?? new InvalidOperationException(logMessage.GetMessage())); break; case MessageLevel.Warning: DisplayStatusMessage($"[SnapEngine] WARNING: {logMessage.Message}", UpdateType.Warning, false); break; case MessageLevel.Debug: break; default: DisplayStatusMessage($"[SnapEngine] {logMessage.Message}", UpdateType.Information, false); break; } }
void subscriber_Log(LogMessage logMessage) { Console.WriteLine(logMessage.GetMessage()); }