Beispiel #1
0
        static void Main()
        {
            Log4NetManager.InitializeFromAppConfig();
#if NETCOREAPP3_1
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
#endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
Beispiel #2
0
 static MvcApplication()
 {
     Log4NetManager.InitializeFromAppConfig();
     LOGGER = LogManager.GetLogger(typeof(MvcApplication));
     if (LOGGER.IsDebugEnabled)
     {
         LOGGER.Debug(string.Format("GLOBAL_ASAX, Process private memory consumption: {0} byte(s)", Process.GetCurrentProcess().PrivateMemorySize64.ToString("### ### ### ###")));
     }
     LogUtils.LogAll();
     if (LOGGER.IsDebugEnabled)
     {
         LOGGER.Debug(string.Format("GLOBAL_ASAX, Process private memory consumption: {0} byte(s)", Process.GetCurrentProcess().PrivateMemorySize64.ToString("### ### ### ###")));
     }
 }
Beispiel #3
0
        static void Main(string[] args)
        {
            Log4NetManager.InitializeFromAppConfig();
            //LogManager.LOGGER = Log4NetManager.Instance;

            //XmlDocument log4netConfig = new XmlDocument();
            //log4netConfig.Load(File.OpenRead(System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).FilePath));
            //var repo = log4net.LogManager.CreateRepository(Assembly.GetEntryAssembly(),
            //   typeof(log4net.Repository.Hierarchy.Hierarchy));
            //log4net.Config.XmlConfigurator.Configure(repo, (XmlElement)log4netConfig.GetElementsByTagName("log4net")[0]);
            FireEvent fe = new FireEvent();

            fe.OnTest += Fe_OnTest;
            fe.Fire();
            Console.ReadLine();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            // initializing logger
            Log4NetManager.InitializeFromAppConfig();
            LOGGER = LogManager.GetLogger(typeof(Program));
            LogUtils.LogAll();

            Console.WriteLine("Running tests...");

            Program p = new Program();

            p.Initialize();
            p.RunTestCalls();
            p.Shutdown();

            Console.WriteLine("Press Enter to exit...");
            Console.ReadLine();
        }
Beispiel #5
0
 public MainWindow()
 {
     Log4NetManager.InitializeFromAppConfig();
     InitializeComponent();
     test.TestEvent += Test_TestEvent;
 }