Ejemplo n.º 1
0
        private bool HasAnyRelevantMessage(IMLoggerScopeNode node, IMLoggerOptions options)
        {
            var hasAnyRelevantMessage = node.Messages.Count > 0 && node.Messages.Any(ms => options.Filter("any", ms.Severity));

            foreach (var nd in node.Children)
            {
                hasAnyRelevantMessage = hasAnyRelevantMessage | HasAnyRelevantMessage(nd, options);
            }

            return(hasAnyRelevantMessage);
        }
Ejemplo n.º 2
0
        public IMLoggerProvider(IMLoggerStore store, IOptions <IMLoggerOptions> options)
        {
            if (store == null)
            {
                throw new ArgumentNullException(nameof(store));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _store   = store;
            _options = options.Value;
        }
Ejemplo n.º 3
0
 public IMLoggerPageMiddleware(RequestDelegate next, IOptions <IMLoggerOptions> options, IMLoggerStore store)
 {
     _next    = next;
     _options = options.Value;
     _store   = store;
 }
 public IMCaptureMiddleware(RequestDelegate next, ILoggerFactory factory, IOptions <IMLoggerOptions> options)
 {
     _next    = next;
     _options = options.Value;
     _logger  = factory.CreateLogger <IMCaptureMiddleware>();
 }
Ejemplo n.º 5
0
 public InMemoryLogger(string name, IMLoggerOptions options, IMLoggerStore store)
 {
     _name    = name;
     _options = options;
     _store   = store;
 }