コード例 #1
0
 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);
 }
コード例 #2
0
 public SourceContextWrapper([NotNull] ILog log, [NotNull] SourceContextValue context)
 {
     BaseLog = log ?? throw new ArgumentNullException(nameof(log));
     Context = context ?? throw new ArgumentNullException(nameof(context));
 }
コード例 #3
0
ファイル: Log4netLog.cs プロジェクト: vostok/logging.log4net
 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();
 }
コード例 #4
0
 private SerilogLog([NotNull] ILogger logger, SourceContextValue sourceContext)
 {
     this.logger        = logger;
     this.sourceContext = sourceContext;
 }