protected override void Write(LogEventInfo logEvent)
        {
            if (_logger == null)
            {
                _logger = new Logger(LogId);
            }

            var message = new Message(logEvent.FormattedMessage)
            {
                Severity = LevelToSeverity(logEvent.Level),
                DateTime = logEvent.TimeStamp.ToUniversalTime(),
                Detail = logEvent.Exception != null ? logEvent.Exception.ToString() : null,
                Data = PropertiesToData(logEvent.Properties)
            };

            _logger.Log(message);
        }
        protected override void Write(LogEventInfo logEvent)
        {
            if (_logger == null)
            {
                _logger = new Logger(LogId);
            }

            var message = new Message(logEvent.FormattedMessage)
            {
                Severity                                   = LevelToSeverity(logEvent.Level),
                DateTime                                   = logEvent.TimeStamp.ToUniversalTime(),
                Detail                                     = logEvent.Exception != null?logEvent.Exception.ToString() : null,
                                               Data        = PropertiesToData(logEvent),
                                               Application = AppDomain.CurrentDomain.FriendlyName,
                                               Source      = logEvent.LoggerName,
                                               Hostname    = Environment.MachineName,
                                               Type        = Type(logEvent)
            };

            _logger.Log(message);
        }
 public ElmahIoTarget(ILogger logger)
 {
     _logger = logger;
 }
 public ElmahIoTarget(ILogger logger)
 {
     _logger = logger;
 }