Beispiel #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            XmlConfigurator.Configure();
            ListBoxAppender.ConfigureListBoxAppender(listBox1);

            _log.Info("This is just an example of how this appender works...");
        }
Beispiel #2
0
        public static void ConfigureListBoxAppender(ListBox listBox)
        {
            var hierarchy = (Hierarchy)LogManager.GetRepository();
            var appender  = new ListBoxAppender(listBox);

            hierarchy.Root.AddAppender(appender);
        }