locked
finding Better way of doing EventViewer logging. RRS feed

  • Question

  • Iam finding Better way of doing EventViewer logging.
    
    

    maifs
    Monday, January 10, 2011 4:38 PM

Answers

All replies

    • Marked as answer by Mehmood Ahmed Monday, January 10, 2011 7:28 PM
    Monday, January 10, 2011 7:13 PM
  • Hi,

    maybe it is just my preference, but why do you build up all these interfaces and this implementation? Isn't it much easier to have TraceSources and then use the configuration of the application to set up some listeners? That way an admin can reconfigure the whole logging without any change on the code level.

    And there are ready to use TraceListeners for event log and logfiles.

    And from my understanding, that is the logging framework that microsoft provided us so there is no need for our own interface ILogger with some implementations like this EventLogger.

    Just look up the classes for this e.g. TraceSource, EventLogTraceListener, ... (This is some basic stuff also part of the 70-536 .Net Framework certification).

    With kind regards,

    Konrad

    Monday, January 10, 2011 7:30 PM