private static void Main(string[] args) { Log4Net.Init(); MqttNetGlobalLogger.LogMessagePublished += OnLogMessagePublished; MainAsync(args) .GetAwaiter() .GetResult(); }
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)); }
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(); }
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"); }
public CheckFile() { Log4Net.Init(); logger = LogManager.GetLogger(typeof(CheckFile)); InitializeComponent(); }
public FlexCelAPI() { Log4Net.Init(); logger = LogManager.GetLogger(typeof(FlexCelAPI)); InitializeComponent(); }