title: Writing to console from ASP.NET Core middleware pipeline
body: <p>Is it possible to write to console from ASP.NET Core middleware pipeline? I want to pass some data from middleware to console. But the following sample code ignores the Console.WriteLine() call in the first delegate but writes response to the browser from 2nd delegate. Here is a part from Startup.Configure method...</p>
  <pre><code>app.UseRouting();
  
              app.Use(async(context, next) =&gt;
              {
                  Console.WriteLine(&quot;Message for console&quot;);
                  await next.Invoke();                
              }
              );
  
              app.Run(async context =&gt;
              {
                  await context.Response.WriteAsync(&quot;Hello from 2nd delegate.&quot;);
              });
  </code></pre>