using GSG.NET.Logging; using GSG.NET.Utils; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace PLCLogger { static class Program { static Logger logger = Logger.GetLogger(); /// /// 해당 애플리케이션의 주 진입점입니다. /// [STAThread] static void Main() { if (!ProcessUtils.IsOnlyOneInstance) { MessageBox.Show("{PLC Logger is running duplicate"); return; } LogUtils.Configure("Config/log4net.xml", true); AppUtils.LogGlobalException(); logger.I("{0} PLC Logger Started {0}", string.Empty.PadRight(40, '+')); try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } catch (Exception e) { logger.E(e); } logger.I("{0} PLC Logger Stopped {0}", string.Empty.PadRight(40, '-')); } } }