Showing your log4net logging in your C# application

If you want to show the log4net logging direct in your application by using a textbox, you can use the following link: http://weblogs.asp.net/psteele/archive/2010/01/25/live-capture-of-log4net-logging.aspx I tried it and it works great:   using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using log4net.Appender; using …

Log4Net error when using a renderer in you’re App.config or Web.config

If you use a Log4Net renderer in you’re App.config, you might get the error: Error: log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [renderer] to set object on [log4net.Repository.Hierarchy.RootLogger] log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [renderer] to set object on [log4net.Repository.Hierarchy.RootLogger]   Solution Place the <renderer> tag not in the <root> tag, but in …

Reading and changing Log4Net configuration at runtime

You can read and change the Log4Net configuration at runtime, the following code, shows the eventlogname en eventlogsource for each eventlogappender defined, but if you change the eventLogAppender object properties the configuration will be changed. XmlConfigurator.Configure(new FileInfo(string.Format("{0}.config", @"C:\Temp\TestApplication.exe.config"))); var repository = LogManager.GetRepository() as Hierarchy; if (repository != null) { var …