// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using log4net; using log4net.Config; namespace Blue.One { public class CB1 { private ILog log = LogManager.GetLogger(typeof(CB1).FullName); public void Test() { log.Fatal("Just testing"); log.Error("Just testing"); log.Warn("Just testing"); log.Info("Just testing"); log.Debug("Just testing"); } } } namespace Blue.Two { public class CB2 { private ILog log = LogManager.GetLogger(typeof(CB2).FullName); public void Test() { log.Fatal("Just testing"); log.Error("Just testing"); log.Warn("Just testing"); log.Info("Just testing"); log.Debug("Just testing"); } } } namespace Red.One { public class CR1 { private ILog log = LogManager.GetLogger(typeof(CR1).FullName); public void Test() { log.Fatal("Just testing"); log.Error("Just testing"); log.Warn("Just testing"); log.Info("Just testing"); log.Debug("Just testing"); } } } namespace Red.Two { public class CR2 { private ILog log = LogManager.GetLogger(typeof(CR2).FullName); public void Test() { log.Fatal("Just testing"); log.Error("Just testing"); log.Warn("Just testing"); log.Info("Just testing"); log.Debug("Just testing"); } } } namespace E { public class Program { public static void Main(string[] args) { XmlConfigurator.Configure(); (new Blue.One.CB1()).Test(); (new Blue.Two.CB2()).Test(); (new Red.One.CR1()).Test(); (new Red.Two.CR2()).Test(); } } }