protected override void Append(LoggingEvent loggingEvent) { // LoggingEvent may be used beyond the lifetime of the Append() // so we must fix any volatile data in the event loggingEvent.Fix = Fix; var formattedEvent = RenderLoggingEvent(loggingEvent); var logEntry = new LogEntry(formattedEvent, new JsonLoggingEventData(loggingEvent)); if (proxyConnection != null) { ProxyOnMessageLogged(logEntry); } else if (MessageLogged != null) { MessageLogged(logEntry); } }
private void ProxyOnMessageLogged(LogEntry entry) { try { proxyConnection.Invoke("OnMessageLogged", entry); } catch (Exception e){ LogManager.GetLogger("").Warn("OnMessageLogged Failed:", e); } }