using Serilog; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace solarApp { static class Program { /// /// The main entry point for the application. /// [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(); } } }