Add project files.
This commit is contained in:
34
PatchEmAll-GUI/Program.cs
Normal file
34
PatchEmAll-GUI/Program.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Serilog;
|
||||
using Serilog.Formatting.Display;
|
||||
using Serilog.Sinks.LogEmAll;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PatchEmAll_GUI
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
ConfigureSerilog();
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new FrmPatchEmAll());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configure the logger.
|
||||
/// </summary>
|
||||
public static void ConfigureSerilog()
|
||||
{
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.MinimumLevel.Information()
|
||||
.WriteToRichTextBox(new MessageTemplateTextFormatter("{Level:u4}: {Message:lj}{NewLine}{Exception}"))
|
||||
.CreateLogger();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user