title: Pattern to use Serilog (pass ILogger vs using static Serilog.Log)
body: <p><strong>Background</strong></p>
  
  <p>In a new project where <em>Serilog</em> was chosen as the logger I automatically started passing around <code>ILogger</code> interface. The code accesses <code>Log.Logger</code> once and from then the classes that desire logging accept <code>ILogger</code> via constructor injection. </p>
  
  <p>I was challenged on this practice and the advice was to use the static methods on the <code>Log</code> class, e.g. <code>Serilog.Log.Debug(...)</code>. The argument is that there is a <code>set;</code> on <code>Log.Logger</code> so mocking is easy.  </p>
  
  <p>Looking at the api I can see that one of the benefits of passing <code>ILogger</code> are the <code>ForContext</code> methods.</p>
  
  <p>I spent some time on the webs and in the <em>Serilog</em>'s documentation but I could not find information about a canonical way to access the log throughout the application code. </p>
  
  <p><strong>Question</strong></p>
  
  <p>Is there a canonical, i.e. better-in-most-cases, way to access/pass around the <em>Serilog</em> logger and if there is, is it passing <code>ILogger</code> or using the static api on the <code>Serilog.Log</code> class?</p>