Ejemplo n.º 1
0
        protected override void Write(LogEventInfo logEvent)
        {
            if (_tableStorageManager != null)
            {
                var layoutMessage = Layout.Render(logEvent);

                if (string.IsNullOrEmpty(LogTimestampFormatString))
                {
                    _tableStorageManager.Add(new LogEntity(PartitionKeyPrefix, logEvent, layoutMessage));
                }
                else
                {
                    _tableStorageManager.Add(new LogEntity(PartitionKeyPrefix, logEvent, layoutMessage, LogTimestampFormatString));
                }
            }
        }
Ejemplo n.º 2
0
 protected override void Write(LogEventInfo logEvent)
 {
     if (_tableStorageManager != null)
     {
         var layoutMessage = Layout.Render(logEvent);
         _tableStorageManager.Add(new LogEntity(logEvent, layoutMessage));
     }
 }
 private void WriteToDatabase(LogEventInfo logEvent)
 {
     _tableStorageManager.EnsureConfigurationIsCurrent(ConnectionString, TableName);
     _tableStorageManager.Add(new LogEntity(PartitionKey, RowKey, logEvent, Layout.Render(logEvent)));
 }