Acropolis.Foundation.EventSourcing.Logging.LogManager.LogEventHandler C# (CSharp) Метод

LogEventHandler() публичный Метод

public LogEventHandler ( String commandId, String eventId, String handlerTypeName, Exception exception = null ) : void
commandId String
eventId String
handlerTypeName String
exception System.Exception
Результат void
        public void LogEventHandler(String commandId, String eventId, String handlerTypeName, Exception exception = null)
        {
            try
            {
                LogEventHandler(new EventHandlerRecord()
                {
                    HandlerId = Guid.NewGuid().ToString(),
                    CommandId = commandId,
                    EventId = eventId,
                    EndedDate = DateTime.UtcNow,
                    ErrorMessage = exception == null ? "" : exception.Message,
                    ErrorStackTrace = exception == null ? "" : exception.ToString(),
                    TypeName = handlerTypeName
                });
            }
            catch(Exception e)
            {
                // Catch all errors because logging should not throw errors if unsuccessful
            }
        }

Same methods

LogManager::LogEventHandler ( EventHandlerRecord record ) : void