private void OnSessionFaulted(object sender, SessionFaultedEventArgs e) { var sessionId = (Guid)e.Context.Properties[SmtpServerConstants.SessionId]; this._logger.LogDebug($"Session with id {sessionId} faulted with: {e.Exception.Message}"); e.Context.Properties.Remove(SmtpServerConstants.Scope); }
private void SmtpServer_SessionFaulted(object sender, SessionFaultedEventArgs e) { this.logger.LogError($"Session Faulted. Properties: {String.Join(", ", e.Context?.Properties?.Select(x => x.Key) ?? Enumerable.Empty<string>())}"); this.logger.LogError(e.Exception?.ToString()); }
static void OnSessionFaulted(object sender, SessionFaultedEventArgs e) { Console.WriteLine("SessionFaulted: {0}", e.Context.Properties[EndpointListener.RemoteEndPointKey]); Console.WriteLine(e.Exception.Message); }
static void OnSessionFaulted(object sender, SessionFaultedEventArgs e) { Console.WriteLine("Session Faulted: {0}", e.Exception); }
void OnSessionFaulted(object sender, SessionFaultedEventArgs e) { _log.Trace(e.Exception, "Session faulted"); }