<commit_before>using Bit.Core.Contracts;
using Bit.Core.Models;
using System.Data.SqlClient;
using System.Threading.Tasks;

namespace Bit.Owin.Implementations
{
    public class SqlServerJsonLogStore : ILogStore
    {
        public virtual AppEnvironment ActiveAppEnvironment { get; set; }

        public virtual IDateTimeProvider DateTimeProvider { get; set; }

        public virtual IContentFormatter Formatter { get; set; }

        public void SaveLog(LogEntry logEntry)
        {
            using (SqlConnection connection = new SqlConnection(ActiveAppEnvironment.GetConfig<string>("AppConnectionstring")))
            {
                using (SqlCommand command = connection.CreateCommand())
                {
                    command.CommandText = @"INSERT INTO [dbo].[Logs] ([Contents]) VALUES (@contents)";

                    command.Parameters.AddWithValue("@contents", Formatter.Serialize(logEntry));

                    connection.Open();

                    command.ExecuteNonQuery();
                }
            }
        }<commit_msg>Removed date time provider from sql json log store<commit_after>using Bit.Core.Contracts;
using Bit.Core.Models;
using System.Data.SqlClient;
using System.Threading.Tasks;

namespace Bit.Owin.Implementations
{
    public class SqlServerJsonLogStore : ILogStore
    {
        public virtual AppEnvironment ActiveAppEnvironment { get; set; }

        public virtual IContentFormatter Formatter { get; set; }

        public void SaveLog(LogEntry logEntry)
        {
            using (SqlConnection connection = new SqlConnection(ActiveAppEnvironment.GetConfig<string>("AppConnectionstring")))
            {
                using (SqlCommand command = connection.CreateCommand())
                {
                    command.CommandText = @"INSERT INTO [dbo].[Logs] ([Contents]) VALUES (@contents)";

                    command.Parameters.AddWithValue("@contents", Formatter.Serialize(logEntry));

                    connection.Open();

                    command.ExecuteNonQuery();
                }
            }
        }
{'fraction_non_alphanumeric': 0.09003831417624521, 'fraction_numerical': 0.0, 'mean_word_length': 2.315873015873016, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2767141', 'n_tokens_mistral': 516, 'n_tokens_neox': 488, 'n_words': 114}