Beispiel #1
0
 private static void Main(string[] args)
 {
     Log4Net.Init();
     MqttNetGlobalLogger.LogMessagePublished += OnLogMessagePublished;
     MainAsync(args)
     .GetAwaiter()
     .GetResult();
 }
Beispiel #2
0
 public MyWebBrowser()
 {
     Log4Net.Init();
     logger = LogManager.GetLogger(typeof(MyWebBrowser));
     InitializeComponent();
     this.urlTextBox.Text = SystemWebsite_Url;
     this.webBrowser.Navigate(this.urlTextBox.Text);
 }
 private static void Main(string[] args)
 {
     Log4Net.Init();
     Logger.Info("Visualizer starting...");
     Settings = SettingManager.ReadConfiguration(args);
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new VisualizerForm(Settings));
 }
Beispiel #4
0
        private static void Main(string[] args)
        {
            Log4Net.Init();

            Settings = SettingManager.ReadConfiguration(args);
            Settings.Client.EnableLogging = true;

            // connect to broker and send data
            MQTT();
            try
            {
                s_Client.Disconnect();
            }
            catch (Exception e)
            {
                Logger.Error("Exception during disconnect. ", e);
            }

            Console.WriteLine("Press ENTER to exit.");
            Console.ReadLine();
        }
Beispiel #5
0
        public void Log4NetLoggerTest()
        {
            Log4Net.Init();
            var logger      = LogManager.GetLogger(typeof(LoggingTests));
            var loggerScope = LogManager.GetLogger("TestScope");

            Assert.False(logger.IsDebugEnabled);
            Assert.False(logger.IsErrorEnabled);
            Assert.False(logger.IsFatalEnabled);
            Assert.False(logger.IsInfoEnabled);
            Assert.False(logger.IsTraceEnabled);
            Assert.False(logger.IsWarnEnabled);

            CallLogger(logger);
            CallLogger(loggerScope);

            SetupLog4Net();
            CallLogger(logger);
            CallLogger(loggerScope);


            logger.Log((LogLevel)(-1), "test");
        }
Beispiel #6
0
 public CheckFile()
 {
     Log4Net.Init();
     logger = LogManager.GetLogger(typeof(CheckFile));
     InitializeComponent();
 }
Beispiel #7
0
 public FlexCelAPI()
 {
     Log4Net.Init();
     logger = LogManager.GetLogger(typeof(FlexCelAPI));
     InitializeComponent();
 }