title: Logging.Logger does not contain a definition for SetLogWriter
body: <p>Copied code from here: <a href="https://www.c-sharpcorner.com/article/logging-block-in-microsoft-enterprise-library-6-0/" rel="nofollow noreferrer">https://www.c-sharpcorner.com/article/logging-block-in-microsoft-enterprise-library-6-0/</a></p>
  
  <pre class="lang-cs prettyprint-override"><code>public class LoggerBlock
  {
      protected LogWriter logWriter;
      public LoggerBlock()
      {
          InitLogging();
      }
      private void InitLogging()
      {
          logWriter = new LogWriterFactory().Create();
          Logger.SetLogWriter(logWriter, false);
      }
      public LogWriter LogWriter
      {
          get
          {
              return logWriter;
          }
      }
  }
  </code></pre>
  
  <p>The compile error is:</p>
  
  <blockquote>
    <p>Microsoft.Practies.EnterpriseLibrary.Logging.Logger does not contain a
    definition for 'SetLogWriter"</p>
  </blockquote>
  
  <p>Sorry, I don't even know which version of the library I have installed. I'm trying to add some logging statements to an existing program that seems to have the app.config set up for Enterprise Library Logging. </p>
  
  <p>Intellisense provides the following similar method only: </p>
  
  <pre class="lang-cs prettyprint-override"><code>Logger.SetContextItemLog (object key, object value) 
  </code></pre>