title: Can I use either EventLog or EventSource for both logging and tracing?
body: <p>I'm trying to create a simplified API for both logging (errors, warnings, info) and tracing (debug, analytics) to the Windows Event Log so I can use Windows Event Viewer to work with the logs. I found the EventLog class and started coding against it, and it works for logging to the Application log. I can't find any documentation on specifying the <a href="http://technet.microsoft.com/en-us/library/cc722404.aspx" rel="nofollow">log subcategory</a> with this class, though. I need to push trace info to the Analytic and Debug logs, and I'd like to let the application choose whether logged events go to the Admin or Operational logs.</p>
  
  <p>I then learned about the EventSource class, and various blogs on MSDN indicate that it does allow you to specify the logging "channel", but I don't know whether the channel is another word for the log subcategory.</p>
  
  <p><a href="https://stackoverflow.com/questions/18921406/what-are-the-advantages-of-using-etw-eventsources-versus-regular-eventlog-api">This</a> is the only thread I could find comparing the two classes, and it didn't seem to answer what I need to know:</p>
  
  <ol>
  <li>Can I use either EventLog or EventSource for logging to a specific to WEL subcategory?</li>
  <li>Is one of them recommended over the other in the .NET 4.5 framework? i.e. is EventLog considered to be deprecated, or is it meant only for non-trace use?</li>
  </ol>