Пример #1
0
        public static int Main(string[] args)
        {
            Serilogger.Configure(ApplicationSettings.Configuration);

            try
            {
                Log.Information("Starting host");
                CreateHostBuilder(args).Build().Run();
                return(0);
            }
            catch (Exception ex)
            {
                Log.Fatal(ex, "Host terminated unexpectedly");
                return(1);
            }
            finally
            {
                Log.CloseAndFlush();
            }
        }