title: ASP.NET MVC Core add logging for other projects
body: <p>I want to add logging to my MVC Core application. I read the following article:
  <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging</a></p>
  
  <p>The problem is that I don't know how to add logging to my other layers in the solution.</p>
  
  <h2>These are the projects I have in my solution:</h2>
  
  <ul>
  <li>MVC Core - No special explanation, just mvc project. References: Common, BL.</li>
  <li>Common - This project contains all entities and interfaces. References: None.</li>
  <li>BL - Business logic - contains the "managers"/"services" - the layer between the ui and data layers. References: Common, DAL</li>
  <li>DAL - Data access layer - Contains the repositories. References: Common</li>
  </ul>
  
  <p>I'm using the built-in mvc core dependency injection framework to inject the ILogger instance into the mvc controllers.</p>
  
  <p>From what I understand, its not a good practice to share logger instance between clases, and each class should have its own logger instance.</p>
  
  <p>What should I do to add logging into my BL and DAL layers?</p>
  
  <p>Thanks for the help!</p>