title: Azure function log info not output
body: <p>I have an azure function which does not appear to log error entries, but does log info entries.</p>
  <p>This is my <code>host.json</code>:</p>
  <pre><code>{
    &quot;version&quot;: &quot;2.0&quot;,
    &quot;logging&quot;: {
      &quot;fileLoggingMode&quot;: &quot;always&quot;,
      &quot;logLevel&quot;: {
        &quot;default&quot;: &quot;Information&quot;,
        &quot;Host.Results&quot;: &quot;Error&quot;,
        &quot;Function&quot;: &quot;Trace&quot;,
        &quot;Host.Aggregator&quot;: &quot;Trace&quot;
      }
    }
  }
  </code></pre>
  <p>And this is the code I'm using to log:</p>
  <pre><code>using Microsoft.Azure.WebJobs;
  using Microsoft.Azure.WebJobs.Host;
  using System;
  using System.Data.SqlClient;
  using System.Threading.Tasks;
  
  namespace DatabaseCleanup
  {
      public static class DataCleanup
      {
          [FunctionName(&quot;DataCleanup&quot;)]
          public static async Task Run([TimerTrigger(&quot;0 */5 * * * *&quot;)] TimerInfo myTimer, TraceWriter log)
          {
              try
              {
                  log.Info($&quot;Data cleanup started: {DateTime.Now}&quot;);
                  // do work
                  log.Info($&quot;Data cleanup ended: {DateTime.Now}&quot;);
                  throw new Exception(&quot;test error&quot;);
              }
              catch (Exception ex)
              {
                  log.Error(&quot;Error thrown&quot;, ex); // this does not show up in logs
              }
          }
      }
  }
  </code></pre>
  <p>And here is what the logs look like in Kudu:</p>
  <pre><code>2022-06-07T15:25:00.008 [Info] Function started (Id=1d293e12-9e66-4973-a304-aed31ea23f5a)
  2022-06-07T15:25:00.008 [Info] Data cleanup started: 6/7/2022 3:25:00 PM
  2022-06-07T15:25:02.448 [Info] Data cleanup ended: 6/7/2022 3:25:02 PM
  2022-06-07T15:25:02.448 [Info] Function completed (Success, Id=1d293e12-9e66-4973-a304-aed31ea23f5a, Duration=2448ms)
  </code></pre>