You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Threading.Tasks;
//using System.Windows.Forms;
namespace TaskUserConnect {
using log4net; using log4net.Config; using System; using System.IO; using System.Reflection; using System.Windows.Forms;
static class Program { private static ILog _log = LogManager.GetLogger(typeof(Program)); /// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread] static void Main() { LoadLog4netConfig(); _log.Info("AP Start");
Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }
private static void LoadLog4netConfig() { var repository = LogManager.CreateRepository( Assembly.GetEntryAssembly(), typeof(log4net.Repository.Hierarchy.Hierarchy) ); XmlConfigurator.Configure(repository, new FileInfo("Log4Net.config")); } }
}
|