FIC_Solar/solarApp/Program.cs
2021-11-03 18:26:53 +08:00

37 lines
1.1 KiB
C#

using Serilog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace solarApp
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Verbose() // 設定最低顯示層級 預設: Information
.WriteTo.File("Logs/solarApp/log-.log",
rollingInterval: RollingInterval.Day, // 每天一個檔案
outputTemplate: "{Timestamp:HH:mm:ss} [{Level:u5}] {Message:lj}{NewLine}{Exception}"
) // 輸出到檔案 檔名範例: log-20211005.log
.CreateLogger();
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new fmExcel());
Application.Run(new fmArchive());
//Application.Run(new fmMain());
Log.CloseAndFlush();
}
}
}