using System; using System.Configuration; using System.IO; using log4net; using log4net.Config; namespace Log4NetTest { /**////<summary> /// Summary description for Class1. ///</summary> class MainTest { privatestatic ILog logger = LogManager.GetLogger(typeof(MainTest)); /**////<summary> /// The main entry point for the application. ///</summary> [STAThread] staticvoid Main(string[] args) { try { logger.Info("Start application"); logger.Debug("Debug Ilog"); int a =0; int b =10/ a; } catch (Exception e) { logger.Info (e.StackTrace, e); } } } }