title: Disable Serilog for product release
body: <p>Is the lack of any defined sinks the proper way to disable Serilog?</p>
  
  <p>I did see this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/30849166/how-to-turn-off-serilog">How to turn off Serilog?</a></p>
  
  <p>But mine's more about how to configure Serilog when releasing a product, so that by default no log files are created when the product is used, and the calls to Serilog have as little overhead as possible.</p>
  
  <p>We configure Serilog using app/web config files, so in a Debug build it looks something like this:</p>
  
  <pre><code>&lt;add key="serilog:minimum-level" value="Verbose" /&gt;
  &lt;add key="serilog:write-to:RollingFile.pathFormat"
       value="%ProgramData%\Product\debug\AppName-{Date}.log" /&gt;
  &lt;add key="serilog:write-to:RollingFile.retainedFileCountLimit" value="10" /&gt;
  </code></pre>
  
  <p>These lines are processed like so:</p>
  
  <pre><code>new LoggerConfiguration().ReadFrom.AppSettings()...
  </code></pre>
  
  <p>When we generate the app/web config files to ship with the product, is it sufficient to remove any sinks from the config files to effectively disable Serilog?</p>
  
  <p>I guess I'm wondering if there's some sort of "off" setting so that the very first thing a call to Serilog does is "if (off) return;", or something along those lines? Or is the lack of any defined sinks basically the same thing? My goal is to configure things so all the calls to Serilog are as fast as possible when we have logging "disabled".</p>