<commit_before>using System;
using System.Collections.Generic;
using System.IO;
using BellRichM.Identity.Api.Data;
using BellRichM.Identity.Api.Exceptions;
using BellRichM.Identity.Api.Extensions;
using BellRichM.Identity.Api.Repositories;
using BellRichM.Logging;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Serilog;
using Serilog.Filters;

namespace InitUsers
{
    class Program
    {
        static void Main(string[] args)
        {
            var rolesInit = "roles.json";
            var usersInit = "users.json";

            var serviceProvider = Configure();
            var roleRepository = serviceProvider.GetService<IRoleRepository>();
            var userRepository = serviceProvider.GetService<IUserRepository>();

            var roles = new List<Role>();
            using (StreamReader streamReader = new StreamReader(rolesInit))
            {
                roles = JsonConvert.DeserializeObject<List<Role>>(streamReader.ReadToEnd());
            }

            var users = new List<UserPassword>();
            using (StreamReader streamReader = new StreamReader(usersInit))
            {
                users = JsonConvert.DeserializeObject<List<UserPassword>>(streamReader.ReadToEnd());
            }

            foreach (var role in roles)
            {
                roleRepository.Create(role).Wait();
            }

            foreach (var user in users)
            {
                userRepository.Create(user.User, user.Password).Wait();
            }
        }

        private static IServiceProvider Configure()
        {
            var logManager = new LogManager("Development");
            logManager.Create("logs");

            var loggerFactory = new LoggerFactory().AddSerilog();

            var builder = new ConfigurationBuilder()
                .SetBasePath(AppContext.BaseDirectory + "../../..")
                .AddJsonFile("appsettings.json", optional: false, reloadOnChange: false)
                .AddEnvironmentVariables();
            var configuration = builder.Build();

            var services = new ServiceCollection();
            services.AddSingleton(loggerFactory);
            services.AddIdentityServices(configuration);
            return services.BuildServiceProvider();
        }<commit_msg>catch util up to new logging infrastructure<commit_after>using System;
using System.Collections.Generic;
using System.IO;
using BellRichM.Identity.Api.Data;
using BellRichM.Identity.Api.Exceptions;
using BellRichM.Identity.Api.Extensions;
using BellRichM.Identity.Api.Repositories;
using BellRichM.Logging;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Serilog;
using Serilog.Filters;

namespace InitUsers
{
    class Program
    {
        static void Main(string[] args)
        {
            var rolesInit = "roles.json";
            var usersInit = "users.json";

            var serviceProvider = Configure();
            var roleRepository = serviceProvider.GetService<IRoleRepository>();
            var userRepository = serviceProvider.GetService<IUserRepository>();

            var roles = new List<Role>();
            using (StreamReader streamReader = new StreamReader(rolesInit))
            {
                roles = JsonConvert.DeserializeObject<List<Role>>(streamReader.ReadToEnd());
            }

            var users = new List<UserPassword>();
            using (StreamReader streamReader = new StreamReader(usersInit))
            {
                users = JsonConvert.DeserializeObject<List<UserPassword>>(streamReader.ReadToEnd());
            }

            foreach (var role in roles)
            {
                roleRepository.Create(role).Wait();
            }

            foreach (var user in users)
            {
                userRepository.Create(user.User, user.Password).Wait();
            }
        }

        private static IServiceProvider Configure()
        {
            var logManager = new LogManager("Development");
            logManager.Create("logs");

            var loggerFactory = new LoggerFactory().AddSerilog();

            var builder = new ConfigurationBuilder()
                .SetBasePath(AppContext.BaseDirectory + "../../..")
                .AddJsonFile("appsettings.json", optional: false, reloadOnChange: false)
                .AddEnvironmentVariables();
            var configuration = builder.Build();

            var services = new ServiceCollection();
            services.AddSingleton(loggerFactory);
            services.AddIdentityServices(configuration, loggerFactory.CreateLogger<Program>());
            return services.BuildServiceProvider();
        }
{'fraction_non_alphanumeric': 0.09587051255447188, 'fraction_numerical': 0.0, 'mean_word_length': 2.3127147766323026, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4089721', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1124, 'n_words': 249}