title: Microsoft.Extensions.Logging - LogError is not logging exception
body: <p>I'm using the simple <code>ASP.NET</code> provided logger that I get via dependency injection: <code>Microsoft.Extensions.Logging.ILogger&lt;T&gt;</code>. In practice the dynamic type is <code>Microsoft.Extensions.Logging.Logger&lt;T&gt;</code>.</p>
  
  <p>When catching exceptions I'm trying to log them using: <code>_logger.LogError(exception, "message")</code>, however only the message is printed.</p>
  
  <pre><code>namespace App
  {
      public class App : IApp
      {
          private readonly ILogger&lt;App&gt; _logger;
  
          public PomParser(ILogger&lt;App&gt; logger)
              =&gt; _logger = logger;
  
          public void DoStuff()
          {
              try
              {
                  DoStuffUnsafe();
              }
              catch (Exception ex)
              {
                  _logger.LogError(ex,"Failed to do stuff");
              }
          }
      }
  }
  </code></pre>
  
  <p>How I configure the logging:</p>
  
  <pre><code>var host = new HostBuilder().ConfigureLogging(ConfigureLogging)...
  ...
  await host.RunAsync();
  </code></pre>
  
  <pre><code>        private static void ConfigureLogging(HostBuilderContext hostContext, ILoggingBuilder configLogging)
          {
              configLogging.ClearProviders();
              configLogging.AddConfiguration(hostContext.Configuration.GetSection("Logging"));
              configLogging.AddFile(
                  options =&gt;
                  {
                      hostContext.Configuration.GetSection("FileLoggingOptions")
                          .Bind(options);
                  }
              );
              configLogging.AddConsoleLogger();
          }
  </code></pre>
  
  <p>appsettings:</p>
  
  <pre><code>{
    "Logging": {
      "LogLevel": {
        "Default": "Information",
        "System": "Information",
        "Microsoft": "Information"
      }
    },
    "FileLoggingOptions": {
      "FileName": "app-",
      "LogDirectory": "logs",
      "FileSizeLimit": 10485760,
      "Extension": "log"
    }
  }
  </code></pre>