public static void SemLog() { Reusable.ThirdParty.NLogUtilities.LayoutRenderers.IgnoreCaseEventPropertiesLayoutRenderer.Register(); var loggerFactory = new LoggerFactory(new[] { ConsoleTemplateRx.Create(new ConsoleTemplateRenderer()), NLogRx.Create(new [] { new TransactionMerge() }) }) { Configuration = new LoggerConfiguration { Attachements = new HashSet <ILogAttachement>(AppSetting.FromAppConfig("omnilog:", "Environment", "Product")) { new Timestamp <UtcDateTime>(), new Snapshot() //new Expected(), //new Actual(), //new AreEqual() } } }; var logger = loggerFactory.CreateLogger("Demo"); //for (int i = 0; i < 10000; i++) { using (logger.BeginScope(s => s.Transaction(123).Elapsed())) { logger.State(Layer.Business, () => ("foo", "bar", "Hallo state!"), LogLevel.Warning); using (logger.BeginScope(s => s.Transaction(456).Elapsed())) { logger.State(Layer.Business, () => ("Customer", new { FirstName = "John", LastName = "Doe" }, "Hallo state!")); logger.Event(Layer.Application, Event.ApplicationStart, Result.Success, "Hallo event!"); logger.Trace("Just a trace"); } } } }