public static LogManager ConfigureForTextWriter(StringWriter tw) { var twTarg = TextWriter.Create(Formatting.StringFormatter.LevelDatetimeMessagePathNl, tw, tw, false, LogLevel.Error, "tw"); var twRule = RuleModule.Create(new Regex(@"^Intelliplan\.Logary\.Specs"), "tw", l => true, m => true, LogLevel.Verbose); var internalTarg = Console.Create("cons", Console.empty); return(Config.Configure( "Logary Specs C# low level API", new[] { twTarg }, Duration.FromSeconds(4L), new Metric.MetricConf[0], new[] { twRule }, LogLevel.Verbose, internalTarg)); }
public static LogManager ConfigureForTextWriter(StringWriter tw) { var twTarg = TextWriter.Create( TextWriter.TextWriterConf.Create(tw, tw, new Microsoft.FSharp.Core.FSharpOption <Formatting.StringFormatter>(Formatting.StringFormatterModule.levelDatetimeMessagePathNl)), PointNameModule.OfSingle("tw")); var twRule = RuleModule.Create(new Regex(@"^Logary\.Specs"), PointNameModule.Parse("tw"), LogLevel.Verbose, message => true); var internalTarg = Console.Create(Console.empty, PointNameModule.Parse("console")); return(Config.Configure( "Logary Specs C# low level API", new[] { twTarg }, new Metric.MetricConf[0], new[] { twRule }, LogLevel.Verbose, internalTarg) .ToTask() .Result); }