Esempio n. 1
0
        public VerifyNoErrorsScope(ILoggerFactory loggerFactory = null, IDisposable wrappedDisposable = null, Func <WriteContext, bool> expectedErrorsFilter = null)
        {
            _wrappedDisposable    = wrappedDisposable;
            _expectedErrorsFilter = expectedErrorsFilter;
            _sink = new LogSinkProvider();

            LoggerFactory = loggerFactory ?? new LoggerFactory();
            LoggerFactory.AddProvider(_sink);
        }
Esempio n. 2
0
        public ServerFixture()
        {
            _logSinkProvider = new LogSinkProvider();

            var testLog = AssemblyTestLog.ForAssembly(typeof(TStartup).Assembly);

            _logToken = testLog.StartTestLog(null, $"{nameof(ServerFixture<TStartup>)}_{typeof(TStartup).Name}", out _loggerFactory, "ServerFixture");
            _logger   = _loggerFactory.CreateLogger <ServerFixture <TStartup> >();

            StartServer();
        }
Esempio n. 3
0
 public LogSinkLogger(string categoryName, LogSinkProvider logSinkProvider)
 {
     _categoryName    = categoryName;
     _logSinkProvider = logSinkProvider;
 }