Beispiel #1
0
        private static void Configure()
        {
            _validator     = new BaseValidationOfDoc();
            PrintingMsDocs = new List <string>();
            _logger        = new LoggerConfiguration()
                             .Enrich.WithExceptionDetails()
                             .WriteTo.Console(theme: SystemConsoleTheme.Colored)
                             .WriteTo.File("logs.log")
                             .MinimumLevel.Debug()
                             .WriteTo.Telegram("1206276933:AAE5Iinp03S5l5bveJ_s4QjF8YYjuUcankc", "61280592",
                                               restrictedToMinimumLevel: LogEventLevel.Error)
                             .WriteTo.Telegram("1206276933:AAE5Iinp03S5l5bveJ_s4QjF8YYjuUcankc", "-347387165",
                                               restrictedToMinimumLevel: LogEventLevel.Error)
                             .CreateLogger();

            var configuration = GetAppsettingsReader();

            _clientToBack = new ClientToBack(
                configuration.GetSection("appSettings:serviceDomain").Value
                // configuration.GetSection("appSettings:printControllerHost").Value
                );

            Registry.Public(_logger);
            Registry.Public(_clientToBack);

            s = new Server();
            s.Start();

            // _disposableserver = RestFullServer.StartServer();
        }
        private static void Configure()
        {
            _validator     = new BaseValidationOfDoc();
            PrintingMsDocs = new List <string>();
            _logger        = new LoggerConfiguration()
                             .WriteTo.Console(theme: SystemConsoleTheme.Colored)
                             .WriteTo.File("logs.log")
                             .MinimumLevel.Verbose()
                             .CreateLogger();

            _disposableserver = RestFullServer.StartServer();
        }