title: .net core 2.0 ConfigureLogging xunit test
body: <p>In my xUnit integration test in my .NET Core 2.0 project I cannot see log messages in the terminal that also prints the test results. When the code is run in WebHost environment, the logs are printed out to the console.</p>
  
  <p>This is how I configure logging in the test's constructor:</p>
  
  <pre><code>var config = new ConfigurationBuilder()
      .AddJsonFile("appsettings.Tests.json")
      .Build();
  
  var services = new ServiceCollection();
  
  services.AddLogging(options =&gt; {
      options.AddConfiguration(config.GetSection("Logging"));
      options.AddConsole();
      options.AddDebug();
  });
  
  var serviceProvider = services.BuildServiceProvider();
  var loggerFactory = serviceProvider.GetService&lt;ILoggerFactory&gt;();
  var logger = loggerFactory.CreateLogger("Test");
  logger.LogError("From ctor");
  </code></pre>
  
  <p>But I don't see any log message.</p>