using System.Data.Common;

namespace EonaCat.Logger.EonaCatCoreLogger
{
    // This file is part of the EonaCat project(s) which is released under the Apache License.
    // See the LICENSE file or go to https://EonaCat.com/License for full license details.
    public class DatabaseLoggerOptions
    {
        public DbProviderFactory DbProviderFactory { get; set; }
        public string ConnectionString { get; set; }

        public string InsertCommand { get; set; } =
            @"INSERT INTO Logs (Timestamp, LogLevel, Category, Message, Exception, CorrelationId)
              VALUES (@Timestamp, @LogLevel, @Category, @Message, @Exception, @CorrelationId)";

        public bool IsEnabled { get; set; } = true;
        public bool IncludeCorrelationId { get; set; }
        public int FlushIntervalSeconds { get; set; } = 5;
        public int FlushBatchSize { get; set; } = 100;
    }
}
