Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Yes, definitely feel there may be a need. Which is why I asked. Thank you. Commented May 4, 2016 at 12:31
  • I would definitely go this route. You classes show know how to call a logger, they shouldn't know the details of how it's done. Look at Common.Logging, log4net, nlog,... I like to pass the Logger abstraction in as a constructor argument and have a DI container wire everything. See Castle.Logging Commented May 4, 2016 at 13:57
  • @Fran I understand that DI is a large part of the .NET world, and I know I need to read-up. Will be doing that soon, thank you for your insight. Commented May 4, 2016 at 14:10
  • 2
    There is also System.Diagnostics.TraceSource if you need/want to avoid pulling in additional dependencies. You can attach different listeners to log out to different locations either programmatically or through app.config files. Commented May 4, 2016 at 17:48