title: Polly -how do I log final error and continue?
body: <p>I'm trying to set up Polly in .Net Core 3.1 (Azure Functions v3). </p>
  
  <p>I want to create a Policy in the Startup class which I can inject into functions. </p>
  
  <p>The behaviour that I'm looking for is: 
  It should wait And retry 3 times - if the final try fails - it should catch and log the exception (Serilog) otherwise just continue.</p>
  
  <p>At the moment I have the following piece of code: </p>
  
  <pre><code>AsyncRetryPolicy emailRetryPolicy = Policy.Handle&lt;Exception&gt;()
      .WaitAndRetryAsync(3, retryAttempt =&gt;
       TimeSpan.FromMilliseconds(retryAttempt * 500));
  </code></pre>
  
  <p>As you see I miss the part where it logs the error after 3 tries - and just continue. Any Idea how to do that? </p>
  
  <p>Serilog is also added in Startup class (Partial code shown)</p>
  
  <pre><code>builder.Services.AddLogging(al =&gt; al.AddSerilog(logger));
  </code></pre>
  
  <p>I'm going to send an email with <em>MailKit</em> and want to log if it for some reasons fails. It should not stop the program for running. </p>