private void OnTrace(object sender, SocketTraceEventArgs e) { _onTrace?.Invoke(e.Description); var desc = e.Description ?? string.Empty; if (!string.IsNullOrWhiteSpace(e.Payload)) { try { var json = JObject.Parse(e.Payload); desc += "\n" + json.ToString(Formatting.Indented); } catch (Exception) { // ignored } } _log.Trace(desc); }
protected virtual void OnTrace(SocketTraceEventArgs e) { Trace?.Invoke(this, e); }
protected virtual void OnTrace(XenLogLevel level, string description) { var args = new SocketTraceEventArgs(description, null, level); OnTrace(args); }
internal virtual void OnTrace(SocketTraceEventArgs e) { Trace?.Invoke(this, e); }
internal virtual void OnTrace(XenLogLevel level, string description) { var e = new SocketTraceEventArgs(description, null, level); Trace?.Invoke(this, e); }