예제 #1
0
        public static int Main(string[] args)
        {
            var logger = NLog.Web.NLogBuilder.ConfigureNLog(DefaultLogger.DefaultConfiguration()).GetCurrentClassLogger();

            try
            {
                logger.Debug("Starting host...");
                CreateHostBuilder(args).Build().Run();
                return(0);
            }
            catch (Exception ex)
            {
                logger.Fatal(ex, "Host terminated unexpectedly.");
                return(1);
            }
            finally
            {
                NLog.LogManager.Shutdown();
            }
        }