Example #1
0
 public Task <AppEvent> LogEvent(string eventKey, AppEventSeverity severity, DateTimeOffset timeOccurred, string caption, string message, string detail)
 {
     return(factory.Events().LogEvent
            (
                this, eventKey, timeOccurred, severity, caption, message, detail
            ));
 }
 private sealed record EventLogItem(AppEventSeverity Severity);
Example #3
0
        public async Task <AppEvent> LogEvent(AppRequest request, string eventKey, DateTimeOffset timeOccurred, AppEventSeverity severity, string caption, string message, string detail)
        {
            var record = new AppEventRecord
            {
                RequestID    = request.ID.Value,
                EventKey     = eventKey,
                TimeOccurred = timeOccurred,
                Severity     = severity.Value,
                Caption      = caption,
                Message      = message,
                Detail       = detail
            };
            await factory.DB.Events.Create(record);

            return(factory.Event(record));
        }