Exemplo n.º 1
0
        public NlogContextRunner(NlogContextRunnerConfig config)
        {
            _config           = config;
            _memoryLogService = new MemoryLogService(config);

            var maxDepth = config?.MaxSanitizerDepth ?? 10;

            OnStart    = Setup;
            OnEnd      = Teardown;
            Settings   = GetActionContextSettings();
            Sanitizers = _config?.SanitizedProperties != null && _config.SanitizedProperties.Length > 0
                ? new[] { new KeyBasedSanitizer(_config.SanitizedProperties, maxDepth) }
                : new[] { new KeyBasedSanitizer(new string[0]) };
        }
Exemplo n.º 2
0
 public MemoryLogApi(IMemoryLogService memoryLogService)
 {
     _memoryLogService = memoryLogService;
 }