Ejemplo n.º 1
0
        protected override void Append(LoggingEvent loggingEvent)
        {
            try
            {
                if (m_minLevel != null && m_minLevel > loggingEvent.Level)
                {
                    return;
                }

                var entity = new LogEventEntity
                {
                    Message    = loggingEvent.RenderedMessage,
                    Level      = loggingEvent.Level.Name,
                    LoggerName = loggingEvent.LoggerName,
                    Domain     = loggingEvent.Domain,
                    ThreadName = loggingEvent.ThreadName,
                    Identity   = loggingEvent.Identity
                };

                var operation = TableOperation.Insert(entity);

                m_table.Execute(operation);
            }
            catch (Exception ex)
            {
                ErrorHandler.Error("Could not write log entry", ex);
            }
        }
Ejemplo n.º 2
0
        protected override void Append(LoggingEvent loggingEvent)
        {
            try
            {
                if (m_minLevel != null && m_minLevel > loggingEvent.Level) return;

                var entity = new LogEventEntity
                {
                    Message = loggingEvent.RenderedMessage,
                    Level = loggingEvent.Level.Name,
                    LoggerName = loggingEvent.LoggerName,
                    Domain = loggingEvent.Domain,
                    ThreadName = loggingEvent.ThreadName,
                    Identity = loggingEvent.Identity
                };

                var operation = TableOperation.Insert(entity);

                m_table.Execute(operation);
            }
            catch (Exception ex)
            {
                ErrorHandler.Error("Could not write log entry", ex);
            }
        }