A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nunit/nunit-console/issues/1586 below:

Loggers don't use latest writer · Issue #1586 · nunit/nunit-console · GitHub

The InternalTrace class uses a static writer which is set in a call to Initialize.
Any caller that gets a ILogger before that call to Initialize is made gets a null writer.

InternalTrace.Initialize is called from TestEngine.Initialize.
Before a user can get there, the initializer of TestEngine has called new ServiceContext() which calls new ServiceManager() which calls InternalTrace.GetLogger(). This logger is called with the InternalTraceLevel.Default meaning it will never log anything.

If the user added any services before that call to TestEngine.Initialize none of them would every log either.

To solve this, the InternalTrace.GetLogger calls should not take the writer and DefaultTraceLevel when called, but the ones that are active.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4