title: Enable raw SQL logging in Entity Framework Core
body: <p>How do I enable the logging of DbCommand raw SQL queries?</p>
  
  <p>I have added the following code to my Startup.cs file, but do not see any log entries from the Entity Framework Core.</p>
  
  <pre><code>void ConfigureServices(IServiceCollection services)
  {
      services.AddLogging();
  }
  
  public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
  {
      loggerFactory.AddConsole(Configuration.GetSection("Logging"));
      loggerFactory.AddDebug(LogLevel.Debug);
  }
  </code></pre>
  
  <p>I'm expecting to see something like this:</p>
  
  <pre><code>Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommandBuilder...
  SELECT [t].[Id], [t].[DateCreated], [t].[Name], [t].[UserName]
  FROM [Trips] AS [t]
  </code></pre>