コード例 #1
0
        public static void Main(string[] args)
        {
            Log.Logger = DefaultLogger
                         .Config("Mahak Distributor")
                         .CreateLogger();

            try
            {
                Log.Debug("app is starting");

                CreateHostBuilder(args).Build().Run();
            }
            catch (Exception ex)
            {
                Log.Fatal(ex, "app terminated unexpectedly");
            }
            finally
            {
                Log.Information("good bye");
                Log.CloseAndFlush();
            }
        }