private bool InclusionPredicate(LogEvent events) { if (events.Level > LogEventLevel.Verbose && events.Properties.TryGetValue("SourceContext", out LogEventPropertyValue SourceContextValue)) { if (SourceContextValue.ToString().Contains("Function.")) { return(true); } } return(false); }
public SourceContextWrapper([NotNull] ILog log, [NotNull] SourceContextValue context) { BaseLog = log ?? throw new ArgumentNullException(nameof(log)); Context = context ?? throw new ArgumentNullException(nameof(context)); }
private Log4netLog([NotNull] ILogger logger, SourceContextValue sourceContext, Log4netLogSettings settings) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.sourceContext = sourceContext; this.settings = settings ?? new Log4netLogSettings(); }
private SerilogLog([NotNull] ILogger logger, SourceContextValue sourceContext) { this.logger = logger; this.sourceContext = sourceContext; }