private void showEvent(Logging.Event e) { idLabel.Text = e.ID.ToString(); typeLabel.Text = e.Type.ToString(); timeLabel.Text = e.Time.ToString("dd. MM. yyyy HH:mm:ss.ff"); if (e.Data != null && e.Data.Data != null) { try { dataView.Stream = e.Data.Data; } catch (UnsupportedDataStreamException) { MessageBox.Show("Given data stream is not supported by current view.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { dataView.Stream = null; } }
protected Logging.Event LogError(Exception ex) { var error = new Logging.Event(AppRelativeVirtualPath, Guid.Empty); error.Exception = ex; error.ExceptionType = ex.GetType().Name; error.Message = ex.Message; error.StackTrace = ex.StackTrace; if (context != null) { error.UserGuid = context.UserGuid; error.ContextGuid = context.ContextGuid; } error.EventSeverity = Logging.EventSeverity.Error; error.EventSource = Logging.EventSource.WebUI; Logging.Logger.Instance.LogEvent(error); return(error); }
protected Logging.Event LogError(Exception ex) { var error = new Logging.Event(AppRelativeVirtualPath, Guid.Empty); error.Exception = ex; error.ExceptionType = ex.GetType().Name; error.Message = ex.Message; error.StackTrace = ex.StackTrace; if (context != null) { error.UserGuid = context.UserGuid; error.ContextGuid = context.ContextGuid; } error.EventSeverity = Logging.EventSeverity.Error; error.EventSource = Logging.EventSource.WebUI; Logging.Logger.Instance.LogEvent(error); return error; }