Esempio n. 1
0
        public Startup(
            IConfiguration configuration)
        {
            Configuration = configuration;

            var loggerConfig = new LoggerConfig();

            configuration.Bind("Logger", loggerConfig);

            loggerConfig.Db = new LoggerConfig.DbConfig
            {
                ConnectionString   = configuration.GetConnectionString("Default"),
                AssembliesWithLogs = new[]
                {
                    typeof(CommandsGateway).Assembly,
                    typeof(IDatabaseAccessor).Assembly,
                    typeof(ILogger).Assembly,
                    typeof(Item).Assembly,
                    typeof(IItemRepository).Assembly,
                    typeof(AppGateway).Assembly,
                    typeof(Startup).Assembly
                }
            };

            LoggerFacade.Configure(loggerConfig);
            _logger = LoggerFacade.GetLogger();
        }